You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a67785c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui,clerk-js,shared,localizations): Offer enterprise SSO in the reverification modal
The modal dropped enterprise_sso from the supported first factors, so a
user whose only factor is an identity provider got "no available
methods". It now shows a button per enterprise connection, runs the IdP
round trip in a popup that reports back through the Account Portal
popup callback, and falls back to a full-page redirect when the popup
is blocked. The prepare call sends the email address of the enterprise
account tied to the chosen connection, which FAPI requires.
After the popup reports back, the modal reloads the session and only
completes once the first factor shows as freshly verified, so a failed
identity provider round trip surfaces as an error instead of a success.
Apps that cannot open a popup can pass `oauthFlow: 'redirect'` to
`useReverification` or to the modal props. 'auto' follows the sign-in
heuristic. The default stays 'popup'.
Part of ORGS-1939
Offer enterprise SSO as a first factor in the reverification modal. Users with an `enterprise_sso` factor now get a button per enterprise connection, verify with their identity provider in a popup, and the action that asked for reverification resumes without a page reload. When the popup is blocked the modal falls back to a full-page redirect, and `oauthFlow: 'redirect'` on `useReverification` or the modal props opts into the redirect from the start. `session.prepareFirstFactorVerification` accepts `actionCompleteRedirectUrl` for the `enterprise_sso` strategy.
@@ -58,6 +58,12 @@ export type NeedsReverificationParameters = {
58
58
* @interface
59
59
*/
60
60
exporttypeUseReverificationOptions={
61
+
/**
62
+
* Control whether enterprise SSO verification in the default UI uses a popup or a full-page redirect. `'auto'` follows the same heuristic as the sign-in component.
63
+
*
64
+
* @default `'popup'`
65
+
*/
66
+
oauthFlow?: OAuthFlow;
61
67
/**
62
68
* Handler for the reverification process. Opts out of using the default UI. Use this to build a custom UI.
63
69
*
@@ -140,6 +146,7 @@ function createReverificationHandler(params: CreateReverificationHandlerParams)
* Whether an OAuth or enterprise SSO round trip opens in a popup or navigates the page. `'auto'` opens a popup only where the current origin supports it.
* Control whether OAuth flows use redirects or popups.
1933
1938
*/
1934
-
oauthFlow?: 'auto'|'redirect'|'popup';
1939
+
oauthFlow?: OAuthFlow;
1935
1940
/**
1936
1941
* Optional for `oauth_<provider>` or `enterprise_sso` strategies. The value to pass to the [OIDC prompt parameter](https://openid.net/specs/openid-connect-core-1_0.html#:~:text=prompt,reauthentication%20and%20consent.) in the generated OAuth redirect URL.
* Control whether OAuth flows use redirects or popups.
2116
2128
*/
2117
-
oauthFlow?: 'auto'|'redirect'|'popup';
2129
+
oauthFlow?: OAuthFlow;
2118
2130
/**
2119
2131
* Optional for `oauth_<provider>` or `enterprise_sso` strategies. The value to pass to the [OIDC prompt parameter](https://openid.net/specs/openid-connect-core-1_0.html#:~:text=prompt,reauthentication%20and%20consent.) in the generated OAuth redirect URL.
0 commit comments