well, I try make a login with refresh token but when the access token expire, dont refresh the token. I used djangorestframework-simplejwt for implementation jwt and angular 9 with rxjs. when try refresh the backend return something like
{
access: "asdsadlsadlsakdslañdksañldsakdsa"
}
but it is not compatible with rxjs
refreshAccessToken() {
return this.http.post<any>(something http )this.getRefreshToken() }, this.httpOptions).pipe(
map(token => {
console.log(token)
this.setNewAccessToken(token['access'])
})
)
}
public setNewAccessToken(token:string){
localStorage.setItem("access", token);
}
and here the error that generates. core.js:6189 ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
I am newbie with rxjs, so I so sorry if my ask is stupid.