fix: wrong redirect url for oidc requests #1909 (#2149)

* fix: wrong redirect url for oidc requests #1909

* fix: login not working with https
This commit is contained in:
Meier Lukas
2024-10-16 16:47:21 +02:00
committed by GitHub
parent d4765c1e7f
commit 6469aa2350
5 changed files with 14 additions and 12 deletions

View File

@@ -106,6 +106,17 @@ export const constructAuthOptions = async (
},
adapter: adapter as Adapter,
providers: [...(await getProviders(req.headers)), EmptyNextAuthProvider()],
cookies: {
sessionToken: {
name: 'next-auth.session-token',
options: {
httpOnly: true,
sameSite: 'lax',
path: '/',
secure: true,
},
},
},
jwt: {
async encode(params) {
if (!isCredentialsRequest(req)) {