Starts in:
2 DAYS
1 HR
38 MIN
3 SEC
Starts in:
2 D
1 H
38 M
3 S
Open Closed

Authentication token duration Desync redirecting after expiriation #5071


User avatar
0
hinairusu created
  • ABP Framework version: v7.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Yes, Microservice Design

We have noticed that the default authentication timeouts between our modules don't seem to match up.Our main Blazor page will allow login, at which you can access our library service (different module) and our base pages. After a while (I think it's an hour or so, unsure as to the exact timings) the library module will return Unauthorised, but the main blazor page is still logged in and running. We also noticed that after a longer while (usually the next day) it shows the user as logged in on the right, but none of the authenticaed menus are present, meaning they are not actually logged in at all.

Example of total expiration: And after logging out and back in:

Sadly I don't have an example to hand of just the one module falling out of Sync

How/Where do we sync up these authentication times?

How do we send the user to the login page automatically if it has expired?


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We added an extension method to sign out after the access token expired.

    Blazor Server https://github.com/abpframework/abp/pull/15876

    Blazor wasm https://github.com/abpframework/abp/pull/16504

    You can copy the code if you use lower version of abp.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Your credit has been refunded.

  • User Avatar
    0
    roberto.fiocchi created

    We added an extension method to sign out after the access token expired.

    Blazor Server https://github.com/abpframework/abp/pull/15876

    Blazor wasm https://github.com/abpframework/abp/pull/16504

    You can copy the code if you use lower version of abp.

    Hi @maliming, but https://github.com/abpframework/abp/pull/16504 is still open. In which version of Abp Blazor WASM was it fixed?

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will find a way to fix balzor wasm.

    https://github.com/abpframework/abp/pull/16504 is fixing MVC UI actually

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    For blazor wasm

    https://github.com/abpframework/abp/pull/16602

  • User Avatar
    0
    hinairusu created

    Thank you very much. Adding in options.IntrospectAccessToken(); appears to have resolved it, although I'll need to confirm it in the morning when my current token expires :)

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06