Skip to content

Add roles and test user guidance#31839

Merged
guardrex merged 5 commits intomainfrom
guardrex/blazor-wasm-identity-roles
Feb 15, 2024
Merged

Add roles and test user guidance#31839
guardrex merged 5 commits intomainfrom
guardrex/blazor-wasm-identity-roles

Conversation

@guardrex
Copy link
Copy Markdown
Collaborator

@guardrex guardrex commented Feb 15, 2024

Fixes #31045

cc: @julioct ... My guesses on dealing with roles/role claims were good. The approach of NOT trying to fight the JSON serializer/deserializer to work with Claim arrays turns out to be the right way to go. Use of an anonymous type on the /roles endpoint side (backend server API) is fine, and using a custom RoleClaim type on the frontend is also good. These are the low-hanging-fruit happy paths 😄.

WRT other claim types, we're going to leave that to the devs to work out from this example. It's a straightforward update to this code to send all of the claims. The frontend code will take whatever is sent back and make user claims out of it. We might do more in this area down the road, but I need to get on with other work for now 🏃‍♂️😅. I'll take feedback from the community in the meantime.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/security/webassembly/standalone-with-identity.md Secure ASP.NET Core Blazor WebAssembly with ASP.NET Core Identity

@guardrex
Copy link
Copy Markdown
Collaborator Author

guardrex commented Feb 15, 2024

... and cc: @adrianjcalvert on this PR to see what's going in.

This will go live into the article by EOD. The sample app on the Blazor samples repo has already been updated ...

https://github.com/dotnet/blazor-samples/tree/main/8.0/BlazorWebAssemblyStandaloneWithIdentity

... BUT I forgot to update the README file. I'll do that in a few minutes. Done! 👍

... and also CC: to @famda-vestas on this.

... and @Ogglas.

I'm trying to notify everyone who asked.

Comment thread aspnetcore/blazor/security/webassembly/standalone-with-identity.md Outdated
@guardrex
Copy link
Copy Markdown
Collaborator Author

Ok ... cool ... glad to get this one in.

Thanks everyone! 🎉🍻

This will go ⚡ LIVE ⚡ in the article within a few hours.

@guardrex guardrex merged commit 2eca9c0 into main Feb 15, 2024
@guardrex guardrex deleted the guardrex/blazor-wasm-identity-roles branch February 15, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Role claims guidance in standalone WASM w/Identity article

2 participants