Blazor WASM Authentication (MSAL) and profile editing

Roberto 41 Reputation points
2023-03-31T09:32:00.7266667+00:00

I setup a profile editing user flow in Azure AD B2C active directory. I successfully setup a Blazor WASM application to redirect the user to the Azure endpoint.

The user can successfully change information in the Azure page, but I cannot setup the Blazor WASM to update the user information once the browser is redirected on the application.

I tried to set the redirect uri to authentication/login-callback but without success. As I see from various properties, there is no action to manage a redirect from a remote profile page.

I set up a custom page my-profile-callback, but I don't know how to refresh the user information cached on the client.

There is a way to refresh account information from MSAL without logout/login process?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,404 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,931 Reputation points
    2023-03-31T17:28:57.3633333+00:00

    the blazor wasm app only has the info that is in the oauth ticket. the ticket will not be updated until it expires.

    the login-callback is expected to be passed a token on the url as a query parameter. the redirect url should force a new login.

    0 comments No comments