-
Notifications
You must be signed in to change notification settings - Fork 9
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
Server side authentication #475
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/dotkom/onlineweb-frontend/5r51t4p54 |
NextAuth.js maintainer her! Gi meg en pip hvis dere trenger hjelp med dette. 😉 Mye som har endret seg siden Innebygd TypeScript, bedre docs, enklere/mer logiske signaturer, osv. |
Change from
oidc-client
tonext-auth
to allow for server side rendering.This is motivated by a change coming to browsers which disallow iframe renewal of tokens, and as such users will be logged out often.
By using Next as a backend-for-frontend, Next can keep renew tokens and keep secrets, allowing for safe renewal of tokens through other flows than PKCE.
To-do before undraft:
pages/api/auth
useSession()
's returned user so that it can share a type with the one actually in use atpages/api/auth
and not need(session.user as unknown as IAuthUser).profile.
this to cast it every time it is needed.