Skip to content

Blazor WebAssembly MSAL authentication error #35162

@IEvangelist

Description

@IEvangelist

Describe the bug

I have a Blazor WebAssembly application that relies on:

<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="6.0.0-preview.6.21355.2" />

For authentication, with an AAD B2C instance. It works perfectly, when running locally. But now that the app is deployed to Azure as a static web app, I get the following error:

"There was an error trying to log you in: 'Cannot read property 'toLowerCase' of undefined'"

The website is deployed here.

To Reproduce

Deploy a Blazor WebAssembly app (with PWA bits) to Azure static web apps, with AAD B2C auth. Try logging in.

Exceptions (if any)

None

Further technical details

Using .NET Core SDK Version: 6.0.100-preview.6.21355.2

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-auth

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions