Skip to content

feat(react): error screens for the routed-not-member and Console SSO refusals - #343

Merged
marcoabreu merged 4 commits into
mainfrom
feat/sdk-error-codes
Nov 27, 2026
Merged

marcoabreu merged 4 commits into
mainfrom
feat/sdk-error-codes

Conversation

@marcoabreu

Copy link
Copy Markdown
Contributor

Description

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T11:46:10.792802Z 1a6617a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Deploying website-react-storybook with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a6617a
Status: ✅  Deploy successful!
Preview URL: https://bbdb24c0.website-react-storybook.pages.dev
Branch Preview URL: https://feat-sdk-error-codes.website-react-storybook.pages.dev

View logs

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size comparison

Name +/- Base Current +/- gzip Base gzip Current gzip
main.js +0.32% 395.26 kB 396.53 kB +0.21% 104.02 kB 104.23 kB
style.css = 38.14 kB 38.14 kB = 6.47 kB 6.47 kB
main.d.ts = 5.63 kB 5.63 kB = 1.39 kB 1.39 kB

Generated by 🚫 dangerJS against 1a6617a

@marcoabreu

Copy link
Copy Markdown
Contributor Author

CI: all checks passed on ab87ad9. Codex: no findings.

@ikovic

ikovic commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

@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

@marcoabreu

Copy link
Copy Markdown
Contributor Author

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.

@marcoabreu

Copy link
Copy Markdown
Contributor Author

CI: all checks passed on 1a6617a. Approved by ikovic; peer range raised to >= 3.32.0 as requested.

@marcoabreu
marcoabreu merged commit 0f6ef6f into main Nov 27, 2026
5 checks passed
@marcoabreu
marcoabreu deleted the feat/sdk-error-codes branch November 27, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants