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 was crazy confused until I noticed that these functions are not returning a refreshToken.
function authenticate(req, res, next) { const { email, password } = req.body; const ipAddress = req.ip; accountService.authenticate({ email, password, ipAddress }) .then(({ refreshToken, ...account }) => { setTokenCookie(res, refreshToken); res.json(account); // missing refresh token }) .catch(next); } function refreshToken(req, res, next) { const token = req.cookies.refreshToken; const ipAddress = req.ip; accountService.refreshToken({ token, ipAddress }) .then(({ refreshToken, ...account }) => { setTokenCookie(res, refreshToken); res.json(account); // missing refresh token }) .catch(next); }
When I refactored to include the refreshToken it, of course, then showed up in the response.
res.json({...account, refreshToken});
The text was updated successfully, but these errors were encountered:
I've been battling same refreshtoken issue as well, i tried this your solution but it didn't work either.
Sorry, something went wrong.
No branches or pull requests
I was crazy confused until I noticed that these functions are not returning a refreshToken.
When I refactored to include the refreshToken it, of course, then showed up in the response.
res.json({...account, refreshToken});
The text was updated successfully, but these errors were encountered: