-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Blazor WASM oidc auth is trying to authenticate using expired refresh token #59810
Comments
Thanks for reaching out. This behavior is by-design. You can catch the Please let us know if this helps your scenario! |
Even if the behavior of throwing an exception is expected, why would the application need to try to send the request to the idp? Wouldn't it be better to just throw the exception then? (The solution provided by @MackinnonBuck did solve the user-problem) |
@wim07101993, the client doesn't necessarily know when the refresh token expires; the server can revoke the refresh token at any time. |
True but if the client already knows that the token has been expired, it does not need to make the network request. Does it? |
I'm not sure the client has a way to know if the refresh token is expired other than trying it. The normal |
We're going to close this as answered. Please open a new issue if you still believe there's a product change we should make here. |
Is there an existing issue for this?
Describe the bug
I have an application which authenticates to a keycloak instance using openId connect. After a while the acces-token an refresh token are expired (on my environment the expiry-time is rather small to do some tests).
.Net however does not seem to notice this and requests a new access-token using the expired refresh-token. This ofcourse results in a 400 response from keycloak (
{"error":"invalid_grant","error_description":"Token is not active"}
)Expected Behavior
When the refresh-token is expired: The user should be redirected to keycloak, in this case, to reauthenticate.
Steps To Reproduce
My configuration:
Exceptions (if any)
No response
.NET Version
.net8
Anything else?
No response
The text was updated successfully, but these errors were encountered: