dotnet / dotnet/AspNetCore.Docs

Additional or different bearer token remarks for Blazor WASM guidance?

Open
#31,381 0 comments 0 reactions 1 assignee Claimed by @guardrex View on GitHub
Blazor doc-enhancement Pri1
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

### Description

Given (for example) Damien's remark at https://github.com/dotnet/AspNetCore.Docs/pull/30421#issuecomment-1728233484 and the sentiment expressed by Lock in [Should you use the .NET 8 Identity API endpoints?](https://andrewlock.net/should-you-use-the-dotnet-8-identity-api-endpoints/#1-bearer-tokens-in-the-browser-should-generally-be-avoided-where-possible), along with our own comments in the WASM+Identity article that ...

> We recommend using cookies for browser-based apps instead of tokens because the browser handles cookies without exposing them to JavaScript.

... I'm not sure what, if any, additional remarks or different remarks the PU would like to make about bearer token use for the Auth lib/MSAL.js. This issue is a placeholder for at least a review of the guidance in the following articles ...

* [*Secure ASP.NET Core Blazor WebAssembly* article](https://learn.microsoft.com/aspnet/core/blazor/security/webassembly/)
* *Client-side/SPA security of sensitive data and credentials* section
* *Authentication library* section
* [*Token auth* section of *Standalone WASM w/Identity* article](https://learn.microsoft.com/aspnet/core/blazor/security/webassembly/standalone-with-identity#token-authentication)

### Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/?view=aspnetcore-8.0

### Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/security/webassembly/index.md

### Document ID

8670b314-460d-3194-c53b-9a44f39c6b2a

### Article author

@guardrex

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.