Skip to content

"Blazor Server with Auth=B2C" template not correctly populating Identity Options. #47447

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

Closed
MSFTJim opened this issue Mar 27, 2023 · 5 comments
Closed
Labels
area-identity Includes: Identity and providers bug This issue describes a behavior which is not expected - a bug.

Comments

@MSFTJim
Copy link
Contributor

MSFTJim commented Mar 27, 2023

The "Blazor Server with Auth=B2C" template is using a line of code that is not populating the Identity Options. Changing to the line of code used in other templates (Ex. WebApp) fixes the issue and provides access to the different B2C options, such as EditProfilePolicyId.

  • Incorrect line of code:

    • var options = microsoftIdentityOptions.CurrentValue;
      • Generated from the default template
  • Correct line of code:

    • var options = microsoftIdentityOptions.Get(OpenIdConnectDefaults.AuthenticationScheme);
@ghost ghost added the area-identity Includes: Identity and providers label Mar 27, 2023
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Mar 28, 2023
@mkArtakMSFT mkArtakMSFT added this to the .NET 8 Planning milestone Mar 28, 2023
@ghost
Copy link

ghost commented Mar 28, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@danroth27
Copy link
Member

@jmprieur Any concerns here with the proposed change to the Azure AD B2C template?

@jmprieur
Copy link
Contributor

jmprieur commented Apr 6, 2023

@danroth27 : this is indeed the thing to do!
Thanks!

@MSFTJim
Copy link
Contributor Author

MSFTJim commented Apr 6, 2023

Great! I'll go ahead and make a PR for the change!!

@javiercn
Copy link
Member

#47654

@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-identity Includes: Identity and providers bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

No branches or pull requests

6 participants
@danroth27 @javiercn @jmprieur @MSFTJim @mkArtakMSFT and others