azure-ad-b2c / samples

Azure AD B2C custom policy solutions and samples.
825 stars 596 forks source link

Adopt sign-in-with-magic-link-keyvault sample for Standalone Blazor WebAssembly app #416

Open ed-ilyin opened 2 years ago

ed-ilyin commented 2 years ago

Hi, we are trying to use sign-in-with-magic-link-keyvault sample in our application.

The sample uses Hosted Blazor WebAssembly model and Microsoft.Identity.Web library which has OnRedirectToIdentityProvider hook, which in turn is used in sample to attach id_token_hint on redirect to B2C.

We use Azure Functions as backend, so no point to use Hosted model and we use Standalone Blazor WebAssembly model instead.

Microsoft.Identity.Web does not work in Standalone model, so Microsoft.Authentication.WebAssembly.Msal library must be used instead.

The problem is that Microsoft.Authentication.WebAssembly.Msal library does not have OnRedirectToIdentityProvider hook. This leads to the fact that library doesn't react when valid access token is sent back to application.

Question is, how to implement sign-in-with-magic-link-keyvault sample in Standalone Blazor WebAssembly app?

svrooij commented 4 months ago

I guess the answer is “you don’t”, almost two years after your first message. I want to follow along, if this ever gets an answer.