C
C#2mo ago
المجدد

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
GitHub
GitHub - AliZedan1A/BlazorProfile
Contribute to AliZedan1A/BlazorProfile development by creating an account on GitHub.
GitHub
BlazorProfile/ClientWA/Pages/ValditViews/AuthValidation.razor at ma...
Contribute to AliZedan1A/BlazorProfile development by creating an account on GitHub.
GitHub
BlazorProfile/ClientWA/Services/Class/Auth.cs at main · AliZedan1A/...
Contribute to AliZedan1A/BlazorProfile development by creating an account on GitHub.
GitHub
BlazorProfile/ClientWA/Services/Class/ApiService.cs at main · AliZe...
Contribute to AliZedan1A/BlazorProfile development by creating an account on GitHub.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server