-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Blazor][Wasm] Set oidc Authentication Options in local storage #20574
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
Comments
Why do think it's a problem to have it in session? Putting tokens in local storage can expose your token to more risk. |
Because while in session, I have to authenticate every time I open a new tab, and I would like to have the option to keep it in local storage for some applications |
Maybe, it would also be nice if we can store it in a cookie, there are some scenarios(with files access) that is useful. |
@StPaulis thanks for contacting us. As @blowdart mentions it, we chose session storage because it limits the exposure of the token. In preview4 we will authenticate the user when the app starts, so you won't have to actively authenticate every time, since after you've done it the first time, it will happen silently and automatically for the rest of the apps when you open a new tab. |
@javiercn can you explain how this will happen? Is this tracked in an other issue, since it is for preview4? Why don't give the user the option to choose? All the oidc javacript libs let you choose your storage type. @blowdart What is that more risk? (XSS applies for both of them, right?) |
By performing a silent sign-in when the app starts, which happens inside a hidden iframe.
Because it adds more concepts that we need to explain users and increases the complexity of the package as well as the testing cost, and we think the ROI is low. |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
Packages Version="3.2.0-preview3.20168.3"
I have just implemented the oidc authentication in a Client Side Blazor application according to the documentation.
Problem
The problem is that the oidc response is saved in the session storage by default and I haven't find a way to configure it.
Suggestion
I would like to have an option to choose the Storage Type ('session' or 'local') when configuring the service on startup: authentication-service-support.
Something like this :
The text was updated successfully, but these errors were encountered: