Skip to content

Commit 6218768

Browse files
Add DEFAULT_ID_TOKEN_CLAIMS to examples.md
1 parent cdc91ca commit 6218768

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

EXAMPLES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,13 @@ export const auth0 = new Auth0Client({
638638

639639
The `session.user` object passed to the `beforeSessionSaved` hook will contain every claim in the ID Token, including custom claims. You can use the `filterDefaultIdTokenClaims` utility to filter out the standard claims and only keep the custom claims you want to persist.
640640

641+
> [!INFO]
642+
> Incase you want to understand which claims are being considered the default Id Token Claims, you can refer to `DEFAULT_ID_TOKEN_CLAIMS`, which can be imported from the SDK from `@auth0/nextjs-auth0/server`:
643+
>
644+
> ```ts
645+
> import { DEFAULT_ID_TOKEN_CLAIMS } from "@auth0/nextjs-auth0/server"
646+
> ```
647+
641648
Alternatively, you can use the entire `session.user` object if you would like to include every claim in the ID Token by just returning the `session` like so:
642649
643650
```ts

0 commit comments

Comments
 (0)