Skip to content

InterceptBeforeHttpAsync calling twice, lost second token refresh #427

Open

Description

@michel-soares

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions