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
feat(react): error screens for the routed-not-member and Console SSO refusals - #343
The SlashID API now answers two sign-in refusals with stable error codes, and @slashid/slashid 3.32.0 names them (ERROR_NAMES.emailDomainRoutedNotMember / consoleSSOSignInRequired, Errors.isEmailDomainRoutedNotMemberError / isConsoleSSOSignInRequiredError):
email_domain_routed_not_member: a verified email domain sent the sign-in to an organization where the person has no account.
console_sso_sign_in_required: the organization requires a sign-in through its identity provider.
This PR gives both their own error screens in @slashid/react (new text keys error.{title,subtitle,retry}.{emailDomainRoutedNotMember,consoleSSOSignInRequired}), with neutral default copy that apps can override; neither screen offers an alternative sign-in. Older SDKs without the guards keep the existing behaviour (compat test). Peer range of @slashid/slashid stays >= 3.30.0.
Also bumps @slashid/remix's @slashid/slashid dependency to 3.32.0 (patch changeset): without it the root build fails on two SDK copies.
Changesets: .changeset/sdk-error-codes.md (react, minor), .changeset/remix-sdk-3-32.md (remix, patch). The versioning PR follows after merge.
Not in this PR (pre-existing): the demo apps on SDK 3.17.1 (kyc-demo, react-nextjs, react-remix, react-vite) are outside the peer range and already call guards their SDK lacks; they need their own bump PR.
Checklist
I have added tests that prove my fix is effective or that my feature works (react unit suite 282/282 on Node 20.9.0; types, lint, root build)
I have generated the new version of the docs website and smoke tested it (n/a: no docs changes)
I have checked that my changes haven't caused semantic errors in the existing docs
I have generated a changeset if my change affects the published packages
@marcoabreu please bump up the peerDependencies entry for the code SDK: "@slashid/slashid": ">= 3.32.0" -> that's how we ensure the React SDK is used with the proper version of the core SDK
Done in 1a6617a: the @slashid/slashid peer is now >= 3.32.0 (the devDependency was already 3.32.0, as in #340). With that minimum the new guards always exist, so getErrorType now calls isEmailDomainRoutedNotMemberError / isConsoleSSOSignInRequiredError directly, and the compat test for older SDKs is removed. The changeset now states the 3.32.0 requirement.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The SlashID API now answers two sign-in refusals with stable error codes, and
@slashid/slashid3.32.0 names them (ERROR_NAMES.emailDomainRoutedNotMember/consoleSSOSignInRequired,Errors.isEmailDomainRoutedNotMemberError/isConsoleSSOSignInRequiredError):email_domain_routed_not_member: a verified email domain sent the sign-in to an organization where the person has no account.console_sso_sign_in_required: the organization requires a sign-in through its identity provider.This PR gives both their own error screens in
@slashid/react(new text keyserror.{title,subtitle,retry}.{emailDomainRoutedNotMember,consoleSSOSignInRequired}), with neutral default copy that apps can override; neither screen offers an alternative sign-in. Older SDKs without the guards keep the existing behaviour (compat test). Peer range of@slashid/slashidstays>= 3.30.0.Also bumps
@slashid/remix's@slashid/slashiddependency to 3.32.0 (patch changeset): without it the root build fails on two SDK copies.Changesets:
.changeset/sdk-error-codes.md(react, minor),.changeset/remix-sdk-3-32.md(remix, patch). The versioning PR follows after merge.Not in this PR (pre-existing): the demo apps on SDK 3.17.1 (kyc-demo, react-nextjs, react-remix, react-vite) are outside the peer range and already call guards their SDK lacks; they need their own bump PR.
Checklist
changesetif my change affects the published packages