Skip to content

Commit 7f02cac

Browse files
Sync documentation updates
1 parent 6c2dc5a commit 7f02cac

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

  • docs
    • code-examples/concepts
    • content/docs/(guides)/concepts

docs/code-examples/concepts/jwt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ const jwks = jose.createRemoteJWKSet(
124124
new URL('https://api.stack-auth.com/api/v1/projects/YOUR_PROJECT_ID/.well-known/jwks.json?include_anonymous=true&include_restricted=true')
125125
);
126126
127-
// Restricted (non-anonymous) users use the same issuer as regular users,
128-
// so only two issuers are needed even though there are three audiences
127+
// All three user types have different issuers
129128
const { payload } = await jose.jwtVerify(token, jwks, {
130129
issuer: [
131130
'https://api.stack-auth.com/api/v1/projects/YOUR_PROJECT_ID',
132131
'https://api.stack-auth.com/api/v1/projects-anonymous-users/YOUR_PROJECT_ID',
132+
'https://api.stack-auth.com/api/v1/projects-restricted-users/YOUR_PROJECT_ID',
133133
],
134134
audience: ['YOUR_PROJECT_ID', 'YOUR_PROJECT_ID:anon', 'YOUR_PROJECT_ID:restricted'],
135135
});`,

docs/content/docs/(guides)/concepts/jwt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Anonymous user tokens have the same shape, but:
8686

8787
Restricted user tokens (e.g., users who haven't verified their email when verification is required) have:
8888

89-
- `iss` remains unchanged (same as regular users)
89+
- `iss` becomes `https://api.stack-auth.com/api/v1/projects-restricted-users/<project-id>`
9090
- `aud` becomes `<project-id>:restricted`
9191
- `is_restricted` is `true`
9292
- `restricted_reason` is `{ "type": "email_not_verified" }`

0 commit comments

Comments
 (0)