Skip to content
New issue

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

Add abillity to refresh tokens in interceptors #35

Open
bohdanzhylavskyi opened this issue Nov 5, 2020 · 0 comments
Open

Add abillity to refresh tokens in interceptors #35

bohdanzhylavskyi opened this issue Nov 5, 2020 · 0 comments

Comments

@bohdanzhylavskyi
Copy link

I have functionality that refreshes token if 401, 403 error happened (i'm using that package axios-auth-refresh). So if token is expired, 401 error will happen, then i'm refreshing tokens (using refresh token) and execute failed requests again. Today i tried you library and have some issues. I rewrote refreshing tokens logic with using userManagement instance (signinSilent method). Problem: when user view page for 5 minute (token lifetime), token is expired, user execute request (clicks button for example), rerender happened and redirect will happen because of that isValid things:
image

from that file https://github.com/thchia/react-oidc/blob/master/src/makeAuth/index.tsx
So is it possible to implement tokens refresh without redirect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant