Skip to content

Blazor WASM application Hangs on MSAL Authentication #38653

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
Julien-Marpault opened this issue Nov 26, 2021 · 3 comments
Closed

Blazor WASM application Hangs on MSAL Authentication #38653

Julien-Marpault opened this issue Nov 26, 2021 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.

Comments

@Julien-Marpault
Copy link

Julien-Marpault commented Nov 26, 2021

.Net 5 & .Net 6

I have a Blazor Wasm using Azure AD Authentication

Program.cs

builder.Services.AddMsalAuthentication(options =>
{
    builder.Configuration.Bind("AzureAD", options);
});

appsettings.json

"AzureAD": {
    "ProviderOptions": {
      "Authentication": {
        "Authority": "https://login.microsoftonline.com/11111111-2222-3333-4444-555555555555",
        "ClientId": "11111111-2222-3333-4444-555555555555",
        "RedirectUri": "URL DE PROD",
        "PostLogoutRedirectUri": "URL DE PROD",
        "ValidateAuthority": true
      },
      "DefaultAccessTokenScopes": [
        "openid",
        "offline_access",
        "https://graph.microsoft.com/User.Read"
      ],
      "LoginMode": "redirect",
      "Cache": {
        "CacheLocation": "LocalStorage"
      }
    }
  }

When authenticating the application hangs on code reception:

https://localhost:5001/authentication/login-callback#code=0.AQkATCPeDuwBZkeUL-NyxJ-DnkVC9cdHKE5Eqq6Vdp3VDegJAMc.AQABAAIAAAD--DLA3VO7QrddgJg7Wevr5XLHSvF2swPM7D4b5t8mlbEc-C154Ehe5HV9aBE8-1X8pzMqgD_nUf0t9n3ZlznuWdoExmiNqPF5QVk_nnFhX3lvOzUeG-52Z7uK_lANjBETQ8QfjEfbUqOWGHpRslopGeFSvkexy-y6EHlZfAAi9reTowISinz1iOrPfHtfttDqREue4WwW2zjBoJwIQf27GU2GoSW2ydoVgmEuA3gf8dlBEIcecjvOUwAHlrdQsn1YU9UU11X0j6CFWWoJ9bwXAgrEN9TtaJUNxAgltmWefDIl8G9OZntWQph4crc7YjA7r0N4vlPvQNU744Z-39lZ3TRRTbLgLTXRHLXgeKj6ccfWj1Wr5yUB4IUvPP2IRllA9zm45YKeoB_9aLkuBjHJJ92foG89n3JZxs06HAc0xUf45z826BwS-p6wsFBHmpofi_E0eL5hCOH_X5ssG4SPIa2U_Ru6OJXKp9uB8AIMNvDBmANVmkPUmtiX9aZkzpaAh1XSWdFkTUJ6uz4rug3MFmJlKPPqWYdHgCTAUo4i6THuSUQDfgPVcyQ6v-GcKUncI57hkMYCg-MwcFgV9bxNoJoTxfmdUlMneaLO5aQ_ntXgLXt5nRfL-bao6iBimzWWYqwTLlS1SzXl1fry3m5XzEWvbe36ktaaGNHB2Vcy3gvJUUpobpabeQ3C9NUXOH8HJonG8jPHCwMTRZm6bdby7xChHmqtJB-VQdeiCThAqTcv23oCDab_-rify_29Ix67LBx6llHtR_5KZBsBTHIyttMV7hDowCjjEZwGB-AmepfSKcGp-7TkJQvnG9rhYM4gAA&client_info=eyJ1aWQiOiI4Zjc5Nzg5ZS02ZjBjLTQ5MTUtOTNhMi04YTcyZTQxNjg1YzQiLCJ1dGlkIjoiMGVkZTIzNGMtMDFlYy00NzY2LTk0MmYtZTM3MmM0OWY4MzllIn0&state=eyJpZCI6IjQ0YmZiOTg4LTU5ZWYtNDE5Zi1hYzIzLWRjNjhlNDEzNjJjZCIsInRzIjoxNjM3OTQyODY2LCJtZXRhIjp7ImludGVyYWN0aW9uVHlwZSI6InJlZGlyZWN0In19%7cSyB9CFaZlcvIzyytvYXAV1Yz0bc9azio0rdjpWkbQCs&session_state=d280705e-3e63-4b17-a828-7f15f4d8b770

@pranavkm pranavkm added the area-blazor Includes: Blazor, Razor Components label Nov 26, 2021
@mkArtakMSFT
Copy link
Contributor

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem.

@mkArtakMSFT mkArtakMSFT added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Nov 29, 2021
@ghost
Copy link

ghost commented Nov 29, 2021

Hi @Julien-Marpault. 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.

@ghost
Copy link

ghost commented Dec 3, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

@ghost ghost closed this as completed Dec 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 17, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.
Projects
None yet
Development

No branches or pull requests

3 participants