This repository was archived by the owner on Oct 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Server side authentication #475
Draft
johanneskvamme
wants to merge
13
commits into
master
Choose a base branch
from
fix/server-side-auth
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.