The Wayback Machine - https://web.archive.org/web/20211218165644/https://github.com/dotnet/aspnetcore/issues/39104
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

Blazor WASM application Hangs on MSAL Authentication. #39104

Open
1 task done
adam-becker opened this issue Dec 17, 2021 · 4 comments
Open
1 task done

Blazor WASM application Hangs on MSAL Authentication. #39104

adam-becker opened this issue Dec 17, 2021 · 4 comments

Comments

@adam-becker
Copy link

@adam-becker adam-becker commented Dec 17, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Same as #38653. When using MSAL authentication in a Blazor WASM application, the login page hangs on the pop-up. Opening the browser's (specifically Chrome) developer tools causes the pop-up to stop hanging and proceed as normal. Our application was created from the Blazor WASM (PWA) template, no modifications have been done to any of the PWA related scripts.

Expected Behavior

The pop-up shouldn't hang at all, regardless of whether the developer tools are open or not.

Steps To Reproduce

To get the issue (it's intermittent as noted in here) we just click our sign-in button, the pop-up appears and just sits there. When this happens, opening the browser's developer tools does something and causes the pop-up to proceed and close.

// Program.cs
builder.Services
    .AddMsalAuthentication<RemoteAuthenticationState, CustomUserAccount>(options =>
    {
        builder.Configuration.Bind("AzureAd", options.ProviderOptions.Authentication);
        options.ProviderOptions.DefaultAccessTokenScopes.Add("https://graph.microsoft.com/openid");
        options.UserOptions.RoleClaim = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
    })
    .AddAccountClaimsPrincipalFactory<RemoteAuthenticationState, CustomUserAccount, CustomUserFactory>();

I can provide more details directly to whoever needs to look at it.

Exceptions (if any)

No response

.NET Version

5.0

Anything else?

IDE: Visual Studio 2022 (2019 also seeing the same issue).
Output of dotnet --info:

$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100\

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  6.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
@TanayParikh
Copy link
Member

@TanayParikh TanayParikh commented Dec 17, 2021

Thank you for filing this issue. In order for us to investigate, please provide a minimal public GitHub project that reproduces this issue.

@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Dec 17, 2021

Hi @adam-becker. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@adam-becker
Copy link
Author

@adam-becker adam-becker commented Dec 17, 2021

Thank you for filing this issue. In order for us to investigate, please provide a minimal public GitHub project that reproduces this issue.

@TanayParikh I will try, might not be able to get to it until next week.

@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Dec 17, 2021

Hi @adam-becker. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants