Share via

Blazor Web Assembly authentication issue in version 10.0.8

Muthukumar S 0 Reputation points
2026-05-28T18:58:35.8233333+00:00

Blazor Web Assembly authentication issue in version 10.0.8

Developer technologies | .NET | Blazor
0 comments No comments

4 answers

Sort by: Most helpful
  1. Muthukumar S 0 Reputation points
    2026-06-03T22:31:42.45+00:00

    @Danny Nguyen (WICLOUD CORPORATION) Replacing manually the AuthenticationService.js in 10.0.8 with the version from 10.0.7 works correctly with the 10.0.8 runtime, without any other changes. It looks like issue in the java script layer. Please share your thoughts on this. Thanks.

    Was this answer helpful?

    0 comments No comments

  2. Muthukumar S 0 Reputation points
    2026-06-01T02:26:16.9+00:00

    @Danny Nguyen (WICLOUD CORPORATION) Thank you for your response. I am currently using .NET SDK 10.0.300 along with MSAL 10.0.8. Could there be any version compatibility issues or potential lifecycle regressions contributing to this behavior?

    I have also observed that AuthenticationService.js is not being executed during the login process, and the RemoteUserAccount object is returning null values. Interestingly, the same setup works as expected with runtime version 10.0.7 on the same SDK.

    I would appreciate your insights on this. Thank you.

    Was this answer helpful?

    0 comments No comments

  3. Danny Nguyen (WICLOUD CORPORATION) 6,945 Reputation points Microsoft External Staff Moderator
    2026-05-29T03:18:32.6466667+00:00

    Hi @Muthukumar S , could you share a bit more detail about the issue? For example, what authentication setup/provider you’re using, the exact error or behavior you’re seeing, and whether this started only after updating to 10.0.8.

    In the meantime, these docs may help with common Blazor WebAssembly authentication setup and troubleshooting:

    If you can share the error message, browser console output, or relevant authentication configuration, it will be easier to suggest specific troubleshooting step.

    Was this answer helpful?


  4. AI answer

    2026-05-28T18:59:06.0166667+00:00

    In 10.0.8 the most common causes for IsAuthenticated == false and RemoteUserAccount == null after an upgrade are configuration or package coherence issues in the Blazor WebAssembly authentication stack.

    Use the following checks and fixes:

    1. Verify identity provider (OIDC/MSAL) configuration
    • Confirm that all OIDC settings still match the provider app registration:
      • Authority / Instance
      • Tenant ID / Tenant domain
      • Client ID
      • Redirect URI
      • Scopes and API permissions
    • A mismatch in any of these (for example, redirect URI or port) prevents the token from being issued and processed, which leaves the user unauthenticated.
    • If the app is running on a different port than configured in the redirect URI, update the provider configuration or the app so they match.
    1. Inspect logs and network traffic
    • Enable client-side authentication logging for Blazor WebAssembly as described in the Blazor logging guidance. This will show whether the OIDC flow completes and whether tokens are received.
    • Use the browser’s developer tools Network tab to inspect the authentication redirects and token responses. Look for error responses from the identity provider or backend.
    1. Check for incoherent packages after upgrading to 10.0.8 A functioning app can fail immediately after upgrading the .NET SDK or changing package versions due to incoherent packages.

    Apply the recommended cleanup steps:

    1. Clear NuGet caches:
         dotnet nuget locals all --clear
      
    2. Delete the project’s bin and obj folders.
    3. Restore and rebuild the project.
    4. If deployed, delete all files in the deployment folder on the server before redeploying.

    Also ensure that all Blazor and authentication-related packages target the same framework and are compatible with .NET 10.0.8. Using package versions incompatible with the app’s target framework isn’t supported.

    1. Confirm the authentication pipeline still runs
    • Ensure the Blazor WebAssembly app still uses the Microsoft.AspNetCore.Components.WebAssembly.Authentication library and that the OIDC authentication process is wired as expected (login page /authentication/login, callback /authentication/login-callback, etc.).
    • If the authentication JavaScript (AuthenticationService.js) or MSAL version was customized or replaced, verify that the custom implementation still matches the 10.0.8 expectations. If a custom AuthenticationService is used, confirm the script reference is correct and loads before blazor.webassembly.js.
    1. Validate the token itself
    • Once a token is obtained, decode it using https://jwt.ms to confirm it contains the expected claims and that it is valid (issuer, audience, expiry). If the token is missing or invalid, the authentication state will remain unauthenticated.

    If after these steps IsAuthenticated remains false, focus on:

    • Logs from the client-side authentication library.
    • Network traces around /authentication/login and /authentication/login-callback.
    • Any differences in configuration or package versions introduced between 10.0.7 and 10.0.8.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.