File tree Expand file tree Collapse file tree
content/docs/(guides)/concepts Expand file tree Collapse file tree Original file line number Diff line number Diff 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
129128const { 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});` ,
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ Anonymous user tokens have the same shape, but:
8686
8787Restricted 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" } `
You can’t perform that action at this time.
0 commit comments