-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client-side authentication in Next.js with NextAuth.js #1207
Conversation
* add provider: Microsoft * documentation * support no tenant setup * fix code style * chore: rename Microsoft provider to AzureADB2C * chore: alphabetical order in providers/index
…" (nextauthjs#919) This reverts commit 6e6a24a.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/u7oab7bao |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add PRs against the canary
branch next time.
It is so unfortunate that we document this badly, but I see your tutorial does not mention either that the pageProps.session
value in _app
must come from somewhere! See #1132
The "How NextAuth.js works" section seems to be not fully explained. Although you are right about the default session value (we keep it minimal to be secure by default), you can extend it as you like, with the help of the jwt
and session
callbacks (see: https://next-auth.js.org/configuration/callbacks)
I think it is pretty important to say here that this is where you can provide an access_token
that can be used to call APIs from the client that needs authentication. Since your tutorial tries to focus on client-side features of NextAuth.js, I feel it is very important to name. (We should actually add this to the documentation. Related issue: #1078)
Apart from that, the tutorial looks nice, but I don't feel it explains anything else the documentation already tells you. The requested changes should more likely be a part of the official docs, rather than in an arbitrary tutorial.
If you are interested in adding those pinpointed changes to the official docs, that would be more than welcome!
@balazsorban44 I'll add these issues you've pointed out to the official docs and also update my article! Sounds cool? |
Awesome! |
What:
Why:
How:
Checklist: