0.0.5 • Published 9 months ago
next-auth-cookie-fix v0.0.5
next-auth-cookie-fix
A library to monkey-patch NextAuth to use Session cookies via Next.js middleware.
This allows to force the session-token
cookies to only have Session
level expiry.
This is needed because it's not provided by NextAuth by default: https://github.com/nextauthjs/next-auth/pull/4693
How to use:
- add the library
npm install next-auth-cookie-fix
add the following middleware to your app:
import { setAuthCookieExpiryToSession } from 'next-auth-cookie-fix'; export const middleware = setAuthCookieExpiryToSession; // this needs to only match the document queries export const config = { matcher: ['/'] };
0.0.5
9 months ago
0.0.4-beta.1
9 months ago
0.0.4-beta.0
9 months ago
0.0.3
9 months ago
0.0.2
9 months ago
0.0.1
9 months ago