-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update login_hint and add support for domain_hint * put domain_hint behind dev flag
- Loading branch information
1 parent
ec77684
commit 31453b5
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,10 +186,15 @@ | |
custom: '' | ||
}, | ||
pi_params: { | ||
passkeys: 'global' | ||
passkeys: 'global', | ||
domain_hint: '' | ||
}, | ||
required: ['client_id', 'redirect_uri', 'nonce', 'response_type'] | ||
}; | ||
const protocolParamsPlaceholders = { | ||
login_hint: '[email protected]', | ||
domain_hint: 'example.com' | ||
}; | ||
const inviteQueryParams = { | ||
params: { | ||
|
@@ -1091,10 +1096,13 @@ | |
states.protocol_param_values.response_mode === 'query' && | ||
states.protocol_params.includes('response_type') && | ||
states.protocol_param_values.response_type === 'id_token') || | ||
//login_hint should start with mailto: | ||
//if both domain_hint and login_hint are checked (only one is valid at a time) | ||
(param === 'login_hint' && | ||
states.protocol_params.includes('login_hint') && | ||
!states.protocol_param_values.login_hint.startsWith('mailto:'))} | ||
states.protocol_params.includes('domain_hint')) || | ||
(param === 'domain_hint' && | ||
states.protocol_params.includes('domain_hint') && | ||
states.protocol_params.includes('login_hint'))} | ||
> | ||
{param} | ||
{required ? '*' : ''} | ||
|
@@ -1161,7 +1169,7 @@ | |
> | ||
<input | ||
type="text" | ||
placeholder={param === 'login_hint' ? 'mailto:[email protected]' : ''} | ||
placeholder={protocolParamsPlaceholders[param]} | ||
name={param} | ||
class="h-6 px-2 w-full form-input" | ||
autocomplete="off" | ||
|