Repository navigation
Conversation
This was referenced Nov 8, 2026
…mapping Covers where post_login, pre_token and static claims run (never for break-glass or recovery, pre_token not on refresh), the call and answer bodies, reason versus userMessage, the 403 login_denied and 503 login_hook_unavailable responses, timeouts and when to fail open or closed, a verified example hook service, static claims per instance role, organization role and OpenID client with their precedence, the reserved names, the shared 1 KiB budget, the provider scopes, and how Auth0 Actions and Rules port, including that Auth0 runs post-login Actions on refresh and Seamless does not. Closes #154
Bccorb
force-pushed
the
docs/login-hooks-custom-claims-guide
branch
from
November 8, 2026 02:46
a5d8f98 to
3b213f4
Compare
This was referenced Nov 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #154. Adds
build/login-hooks-custom-claims.mdx: login hooks, static custom claims, and how to port Auth0 Actions and Rules to them.Merge with the auth API v0.23.0 release, not before. Every route on the page needs API v0.23.0, which is held (fells-code/seamless-auth-api#566). The page opens with a caution, and its versions table marks the console pages (fells-code/seamless-auth-admin-dashboard#343), the CLI commands (fells-code/seamless-cli#359) and provider token claims (fells-code/seamless-auth-oidc-provider#63) as unreleased.
Stacked on #165 (base
docs/webhooks-guide), since the page links the webhooks guide for the shared signing and URL rules. It also adds the webhooks guide's link back to this page.What it covers
pre_tokenclaims are as fresh as the session (not called on refresh); static role claims are resolved at every token, refresh included.LoginHookCallSchema) and answers,reason(audited, never shown) versususerMessage(shown), stripping of reserved names versus failing on other bad claims, the sign-in routes that can answer403 login_deniedand503 login_hook_unavailable, timeouts (2000 ms default, 100 to 5000, one attempt), failure modes and when to pick each, the invocation log and audit events, setup through the console, CLI and admin API, and that aPUTresets omitted settings to defaults.verifyWebhookrefuses hook calls (invalid_payload), because it parses against the webhook catalog.pre_token, with role name order inside a kind), setup, name and value rules, the full reserved list, the shared 1 KiB budget in the order chosen on 2026-11-07, and the provider scopespermissionsandcustom_claims(final, per Brandon's decision of 2026-11-07).operate/migrate-from-auth0.mdxnow points here, saying v0.23.0 is not released.How the example was proven
The hook service was run locally and called with bodies built by
LoginHookCallSchema.parseand headers from the auth API's ownsignedCalloutHeaders(onfeat/oidc-provider-claims): an allowedpost_login, a denied one, and apre_tokencall signed with two secrets. Each answer parsed withPostLoginHookResultSchemaorPreTokenHookResultSchema, and the API'sscreenHookClaimskept the claims unchanged. A call signed with the wrong secret and one with a timestamp 400 seconds old both got401.Auth0 facts, each checked on Auth0's site on 2026-11-07
event.transaction.protocolincludesoauth2-refresh-token;event.authorization.roles: https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-objectapi.access.deny(reason may be shown to end users),setCustomClaimon ID and access tokens,api.multifactor.enable,api.redirect.sendUserTo(no redirect foroauth2-refresh-token),api.user.setAppMetadata: https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-objectFor review
src/claimsMismatch.ts) with seamless-auth-api#585 answeringclaims_mismatch: the provider reads the account again and signs once more; a second mismatch, or an account that has gone, answers 500server_errorwith "the account changed while the token was being issued, try again"; no other refusal is retried.userMessage: the page says@seamless-auth/reactand@seamless-auth/clientput the code inerr.messageand the hook's text aterr.body.message, and the built-in views show fixed text (from the seamless-auth-api#583 body). An SDK change would let the line go.Testing
npm run typecheck: 0 errors, 0 warnings, 0 hints.npm run lint: exit 0.npm run build: 76 pages built (re-run after the retry update in a5d8f98). The pre-commit hook ran the build again.migrate-from-auth0resolves indist. The page is indist/llms.txtand the sitemap.npm run check:matrix, and nothing against a live API (none can be until v0.23.0).