When specifying a session timeout with Auth0, is there any documentation on how to set up the client-side to respect it? I’ve used this post as a reference but it doesn’t cover that aspect.
Currently, when the session expires, the application fails to perform calls to the backend but what I’d like to achieve is to kick it to the main page. Also, I thought the CascadingAuthenticationState
element wrapping the Router
would get triggered but it seems like it allows the stale page to continue working.
A silent error logged:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: ''
Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenNotAvailableException: ''
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Tva.Client.Infrastructure.BlazorDisplaySpinnerAutomaticallyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage , CancellationToken )
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage , HttpCompletionOption , CancellationTokenSource , Boolean , CancellationTokenSource , CancellationToken )
at Tva.Client.Pages.redacted.Services.IdentityService.GetAllUser()
at Tva.Client.Pages.Users.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )