Single Sign In

Let a user sign in once and be signed in across a whole suite of apps on sibling subdomains: opening a second app needs no second visit to Internet Identity, and signing out of one signs them out of all. Covers the shared record with CookieStateStorage, the /reauth route that silently acquires each app's own credential under transport: 'redirect' and prompt: 'none', the per-origin /.well-known/ii-auth-callbacks document, reading signed-in-elsewhere on load and offering it mid-session, and what ends the session. Use when a suite of apps under one domain should need a single sign-in, when moving between them asks the user to sign in again, or when /reauth bounces in a loop. Every app must already derive from one elected primary origin: load user-sign-in and settle that first. Do NOT use for a single app on one origin, which needs none of this, for apps on unrelated domains, which cannot share a cookie, or for staff signing in with their organization's identity provider (use organization-sign-in).

jiayaoqijia Updated 81 repo stars

File contents

jiayaoqijia/cryptoskill commit 6939945c90 Runs: jiayaoqijia/user-sign-in

Frequently asked questions

npx get-skill add jiayaoqijia/single-sign-in