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

InterceptBeforeHttpAsync calling twice, lost second token refresh #427

Open
michel-soares opened this issue Jun 2, 2022 · 0 comments
Open

Comments

@michel-soares
Copy link

Describe the bug
The InterceptBeforeHttpAsync on HttpInterceptorManager is calling twice, because it is register twice.

Registered in MainBody.razor.cs OnInitializedAsync
Registered in MainLayout.razor.cs OnInitializedAsync

The server will generated two new refresh tokens and sometimes the client will store the first on. In the next try to refresh, the system will logout because the tokens are not the same.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'browser F12 network tab'
  2. Click on 'see multiple call to refresh token when token was expired'

If do not want to wait expired token, insert a console.,log in HttpInterceptorManager.InterceptBeforeHttpAsync and see in any request the console will have the value writed twice.

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