Duende.AccessTokenManagement.OpenIdConnect refresh expired cookie #379
Unanswered
njannink
asked this question in
Open Source
Replies: 2 comments 2 replies
-
|
Our AccessTokenManagement library only refreshes tokens on your behalf when a call is being made using an HttpClient. If your use case requires authentication for accessing static resources like images etc., then you would indeed need to implement logic similar to the Blazor sample you've linked to ensure that the authentication cookie is refreshed when the tokens stored inside are nearing their expiration time. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
is there a way how I can do this using the duende API so I dont have to build the OIDC request myself like the example? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We use Duende.AccessTokenManagement.OpenIdConnect for handling the authentication of our Blazor Server app there is still a scenario that doesn't seem to work as expected.
We use cookies for authentication of image src, download links etc. I have the idea that if the cookie token is expired that this one isn't refreshed. AspNetCore has this logic for that:
https://github.com/dotnet/blazor-samples/blob/main/9.0/BlazorWebAppOidc/BlazorWebAppOidc/CookieOidcRefresher.cs
Is this taken into account aswell by Duende or should I add this refresh logic in the CookieEvents validation call?
Beta Was this translation helpful? Give feedback.
All reactions