mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 20:35:39 +02:00
fix auth locally
This commit is contained in:
parent
05292f9ebb
commit
e61ec28531
1 changed files with 9 additions and 0 deletions
|
@ -24,5 +24,14 @@ export const initAuth = (allowList: string[]) => {
|
||||||
},
|
},
|
||||||
plugins: [username()],
|
plugins: [username()],
|
||||||
trustedOrigins: allowList,
|
trustedOrigins: allowList,
|
||||||
|
advanced: {
|
||||||
|
useSecureCookies: process.env.NODE_ENV === "production", // don't mark Secure in dev
|
||||||
|
defaultCookieAttributes: {
|
||||||
|
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
|
||||||
|
path: "/",
|
||||||
|
// httpOnly: true is default
|
||||||
|
// secure: false (implied by useSecureCookies false)
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue