We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I try to set maxAge for cookie, but no matter what I do the expiration is always "Session"
The frontend and backend are not on the same domain.
Btw, it works on localhost
My code:
async function login(req, res) { try { const { email, password } = req.body const { token, refreshToken, user } = await authService.login({ email, password }) res.setCookie("refreshToken", refreshToken, { httpOnly: true, sameSite: "None", secure: true, path: "/", signed: true, maxAge: 30 * 24 * 60 * 60 }).send({ accessToken: token, user }) } catch (e) { console.error(e) return res.status(401).send({ error: "Unauthorized" }) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to set maxAge for cookie, but no matter what I do the expiration is always "Session"
The frontend and backend are not on the same domain.
Btw, it works on localhost
My code:
The text was updated successfully, but these errors were encountered: