Open hannes-ma opened 1 month ago
Hello @hannes-ma
Thank you for pointing this out, we seem to have been experiencing the same problem. Please let us know if you discover any more details about this issue. We will try to investigate in the near future.
Is this an issue with mix mode where blazor switching back and forth between client components and server components? There were some Auth0 articles that were talking about how complex that actually is and it was causing similar symptoms.
@jstafford5380 Well in my case I'm only using server-side rendering (no WASM and also pre-rendering disabled). What I've seen till now is that the issue is not reproducible on my local development environment, where the blazor application and browser are running on the same host. It only happens when deployed via docker container on the cloud server, therefore my assumption that it depends on date/time differences between server and client browser.
@hannes-ma
Agreed, the issue does not seem to relate to the complexity of InteractiveAuto
, as we are experiencing it while using just InteractiveWebAssembly
rendering.
Probably something to do with timing and at what exact moment expired cookies are getting cleared from the browser. We have implemented the package assuming the expired cookies will no longer be sent after they have expired, but there is clearly something going wrong there.
At first it seemed like we were experiencing the same issue as the one described here, but at some point it went away. Not sure what caused it to change. I have also tried manually to get it to happen but wasn't able to.
Is anyone here able to replicate this issue at least somewhat consistently? We seem to require additional information on this issue in order to track it down.
Hello all, I'm encountering a strange problem using Blazor.Auth on a Blazor Server implementation where the access token is not refreshed after expiration.
I have the following situation:
Just an assumption, but could it be that the server and the browser have a slightly different time of day, so the cookie hasn't been expired and removed on the browser so it is still sending it to the server? I've seen this using Google Chrome.
What could be a possible fix around this? IMO the code in ServerSidePrerenderAuthenticationStateProvider should be changed to allow the access token to fail validation and in this case it should go ahead with the refresh token.