-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(types,clerkjs,backend): Add support for enterprise_sso strategy #4596
feat(types,clerkjs,backend): Add support for enterprise_sso strategy #4596
Conversation
🦋 Changeset detectedLatest commit: 4af970e The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4557562
to
d676e5e
Compare
@Nikpolik Could we update We're already checking for active accounts within If tests start failing, we should probably introduce a |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
9975d2b
to
f1bac6d
Compare
f1bac6d
to
b2351cb
Compare
Handle the case of a sign in request that includes an identifier that matches the domain of an enterprise connection (SAML, Custom OAuth or EASIE). From version 2024-10-01 and onwards the API will respond with a status of `needs_first_factor`, the only strategy that will be included in supported first factors is `enterprise_sso` and the email address that matched will be returned in the identifier field. This commit updates the sign in component to read this new response and proceed with the enterprise_sso strategy.
When you enable SAML or any other enterprise sso strategy, both SAML and EnterprisSso will become enabled in the user_settings. Update the test helper to more closely reflect that.
b2351cb
to
97628f8
Compare
@@ -13,6 +13,7 @@ export type BackupCodeStrategy = 'backup_code'; | |||
export type ResetPasswordPhoneCodeStrategy = 'reset_password_phone_code'; | |||
export type ResetPasswordEmailCodeStrategy = 'reset_password_email_code'; | |||
export type CustomOAuthStrategy = `oauth_custom_${string}`; | |||
export type EnterpriseSSOStrategy = 'enterprise_sso'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 We should mark SamlStrategy
as deprecated in favor of EnterpriseSSOStrategy:
/**
* @deprecated Use `EnterpriseSSOStrategy` instead
*/
export type SamlStrategy = 'saml';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed f9c2194
Thanks for catching this, we need to mention it in the API docs as well I'll update them!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the docs, we'll need to update it here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to update the changesets but overall looks good to me 👍🏻
6d1b541
to
4af970e
Compare
Description
This PR adds support for the new
enterprise_sso
strategy for signing in and signing up.This strategy supersedes SAML to provide a single strategy as the entry point for Enterprise Single Sign On regardless of the underlying protocol used to authenticate the user. For now there are two new types of connections that are supported in addition to SAML, Custom OAuth and EASIE (multi-tenant OAuth).
This new strategy will is available from API version
2024-10-01
and after because the way the API responds for Sign In's with an email address that matches a SAML connection changes.From this version and onwards the API will respond with a status of
needs_first_factor
, the only strategy that will be included in supported first factors isenterprise_sso
and the email address that matched will be returned in the identifier field. This change was made to make a bit clear the next step required.Changes
enterprise_sso
in responses and request types.enterprise_sso
in supported first factors.enterprise_sso
in missing fieldsSUPPORTED_API_VERSION
constant to2024-10-01
API Version
2024-10-01
Besides this change updating the version to
2024-10-01
will also enable the email's for Sign Ins from new clients feature.Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change