-
Is there a way to keep the user signed in across sessions similar to a Remember Me checkbox? When I come back to the app it usually asks me to sign in again. FYI, using Blazor Web Assembly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It does not seem like the team really monitors any of these discussions. I am seeing very little engagement here. I did find an open issue here: #213 |
Beta Was this translation helpful? Give feedback.
-
I will answer my own question for future reference for others. The authentication is stored in a cookie that persists across browser sessions. You can access JSON data about the logged in user at /.auth/me:
How and when you use that information will vary based on your front end. This article uses it for Blazor WebAssembly: Authenticate Blazor WebAssembly with Azure Static Web Apps Here is a link to the code that reads that data and authenticates the user: |
Beta Was this translation helpful? Give feedback.
I will answer my own question for future reference for others.
The authentication is stored in a cookie that persists across browser sessions.
You can access JSON data about the logged in user at /.auth/me:
How and when you use that information will vary based on your front end. This article uses it for Blazor WebAssembly:
Authenticate Blazor WebAssembly with Azure Static Web Apps
Here is a link to the code that reads that data and authenticates the user:
https://github.com/anthonychu/blazor…