You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/guides/extending-the-session.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ To have access to the user id, add the following to your Auth.js configuration:
34
34
```
35
35
36
36
During sign-in, the `jwt` callback exposes the user's profile information coming from the provider.
37
-
You can leverage this to add the user's id to the JWT token. Then, on subsequent calls of this API will have access to the user's id via `token.id`.
37
+
You can leverage this to add the user's id to the JWT token. Then, on subsequent calls of this API you will have access to the user's id via `token.id`.
38
38
Then, to expose the user's id in the actual session, you can access `token.id` in the `session` callback and save it on `session.user.id`.
39
39
40
40
Calls to `auth()` or `useSession()` will now have access to the user's id.
0 commit comments