stack/packages/stack-shared
Bilal Godil ce66a1908d feat(sdk): add signInWithSaml, signInWithSso, getSamlConnectionForEmail
Three methods on StackClientApp that mirror signInWithOAuth:

- signInWithSaml({ connectionId, returnTo }) — explicit connection
  selection. Calls /auth/saml/login/[connectionId] in stack_response_mode
  =json so the SDK can intercept the redirect URL.

- signInWithSso({ email, returnTo }) — email-domain discovery via
  /auth/saml/discover, then redirects through the matched connection.
  Throws when no connection matches so callers can fall back to other
  sign-in methods.

- getSamlConnectionForEmail(email) — pure lookup with no redirect, so
  the customer's UI can render branding ("Sign in with Acme SSO")
  before the user clicks.

Backed by getSamlUrl + authorizeSaml + discoverSamlConnection on
StackClientInterface (mirrors getOAuthUrl + authorizeOAuth pattern,
without provider_scope or bot challenge — SAML originates from a
corporate IdP, not a public form).

Generated via pnpm -w run generate-sdks; propagates from
packages/template into packages/js, packages/react, packages/stack.
2026-04-29 16:47:16 -07:00
..
src feat(sdk): add signInWithSaml, signInWithSso, getSamlConnectionForEmail 2026-04-29 16:47:16 -07:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
LICENSE Licenses 2024-02-28 15:27:00 +01:00
package.json chore: update package versions 2026-04-20 19:06:56 -07:00
tsconfig.json Update packages, add bundle analyzer, add declarationMap (#665) 2025-05-16 17:07:44 -07:00
tsdown.config.ts Fix build 2026-02-27 00:48:07 -08:00
vitest.config.ts In-source unit tests (#429) 2025-02-14 11:47:52 -08:00