I have Node.js MongoDB Starter Bundle (v04-03-2020)
It use by default NbPasswordAuthStrategy
and
token: {
class: NbAuthOAuth2JWTToken,
key: 'token',
},
For the sake of simlicity i don't write tokens. I think it doesn't matter
Current behavior:
After succesful login, access & refresh tokens successfully stored in local storage in such format:
After expiration period i see request to backend (endpoint '/refresh-token')
In backend AuthService.js -> refreshToken(token)
i write console.log(token)
Expected behavior:
After refresh token request local storage tokens should be updated and this.tokenService.tokenChange() should fired, but its not happend
Steps to reproduce:
Just login as user@user.user and after expiration period of time tokens should be updated in local storage
Other information:
Ubuntu Server 18.04
npm 6.14.4
node v12.17.0
Chrome 83.0.4103.61 (64)
I have Node.js MongoDB Starter Bundle (v04-03-2020) It use by default NbPasswordAuthStrategy and token: { class: NbAuthOAuth2JWTToken, key: 'token', },
For the sake of simlicity i don't write tokens. I think it doesn't matter
Current behavior: After succesful login, access & refresh tokens successfully stored in local storage in such format:
After expiration period i see request to backend (endpoint '/refresh-token') In backend AuthService.js -> refreshToken(token) i write console.log(token)
First of all it check token format:
And of course it throw Error (because need to check token.token.access_token)!!! Ok. I made a little change
... and it's ok
New token sended to a frontend and I see in a browser console response:
But in local storage tokens left unchanged!
Expected behavior: After refresh token request local storage tokens should be updated and this.tokenService.tokenChange() should fired, but its not happend
Steps to reproduce: Just login as user@user.user and after expiration period of time tokens should be updated in local storage
Other information: Ubuntu Server 18.04 npm 6.14.4 node v12.17.0 Chrome 83.0.4103.61 (64)