المجدد
A problem with blazor while verifying cookies
I created a login system with JWT refresh token. The code works well when logging in and so on, but the problem occurs when the JWT expires. I need to send a refresh token request to get a new JWT. The process succeeds, but the issue is that during the first page refresh, the user is not activated. On the second refresh, they become activated.
I don't know the reason, even though I ensured that the operations are not synchronized, so the request must complete before displaying the page after updating the cookies. However, what happens is the opposite, I think.
What is the solution?
The project: https://github.com/AliZedan1A/BlazorProfile/tree/main
Razor component for using the validation function: https://github.com/AliZedan1A/BlazorProfile/blob/main/ClientWA%2FPages%2FValditViews%2FAuthValidation.razor
Validation function: https://github.com/AliZedan1A/BlazorProfile/blob/main/ClientWA%2FServices%2FClass%2FAuth.cs
ApiService: https://github.com/AliZedan1A/BlazorProfile/blob/main/ClientWA%2FServices%2FClass%2FApiService.cs
1 replies