Skip to content
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

Modify code example so that the original user claims are not deleted #32343

Closed
lettuceDestroyer opened this issue Apr 17, 2024 · 8 comments
Closed
Assignees
Labels

Comments

@lettuceDestroyer
Copy link

Description

When following the instructions on the section Customize the user with a payload claim we are essentially overriding the claims which the authentication provider provides. This might not be what the developer wants or expects. I think I would make sense to write a comment to make sure the user is aware of this "problem". An other possibility would be to insert a link to this documentation as it does not cause the same problem.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/additional-scenarios?view=aspnetcore-8.0#customize-the-user

Content source URL

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

Document ID

cc8dfcd6-8d93-5aa3-c381-2b613e88cdbe

Article author

@guardrex

Copy link
Contributor

😎 Welcome April! Summertime is almost here! 🌞

A green dinosaur 🦖 will be along shortly to assist. Stand-by ........

@guardrex
Copy link
Collaborator

Thanks @lettuceDestroyer .... I'll take a look at this for updates soon.

@guardrex
Copy link
Collaborator

@lettuceDestroyer ... I'm a bit buried at the moment 🏃😅. I hope to be able to reach no later than the end of next week. I have a few high priority items on my plate at the moment.

@guardrex
Copy link
Collaborator

It didn't work out for last week.

I'm getting closer to this, but a new high priority work item arrived for a new Blazor MAUI article.

I'll get to this issue as soon as I can 🏃‍♂.

@lettuceDestroyer
Copy link
Author

@guardrex Don't worry, I have all the time in the world. In the mean time good luck 🍀

@guardrex
Copy link
Collaborator

guardrex commented May 1, 2024

I finally reached this for a look 😅.

I don't know why this would be the case. Let's ask @halter73 to take a look at this issue.

Stephen, if @lettuceDestroyer's report is correct, what other code preserves the claims that I can show SxS with this code? I'd rather not link off to the other article. It's better to show both approaches here in this article.

@lettuceDestroyer
Copy link
Author

@guardrex @halter73 I tried it again and it seems to work now in the way the documentation describes it. I unfortunately do not know why the code did not previously work since my project developed quite a bit in this short time. Thank you for looking into it.

@guardrex
Copy link
Collaborator

guardrex commented May 1, 2024

Sure thing ... that's what I thought because I didn't see a reason why the code would be doing that AND my test apps never demonstrated that behavior.

I'm glad it had a happy ending! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants