Skip to content

Add abillity to refresh tokens in interceptors #35

@bohdanzhylavskyi

Description

@bohdanzhylavskyi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions