Add roles and test user guidance #31839
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 customRoleClaim
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