How to wire up MSAL with the newest Uno platform

56 Views Asked by At

trying out the newest uno platform 4.1 and I wanted to use the MSAL extensions.

In the startup the template added

 .UseAuthentication(auth =>
     auth.AddMsal(name: "MsalAuthentication")
     )
     .ConfigureServices((context, services) =>
     {
         // TODO: Register your services
         //services.AddSingleton<IMyService, MyService>();
     })

Now I really can't figure out what is needed to be registered as my service? The documentation does not match what's in this new template. Any suggestions?

So update, figure out how to get this to work, you have to enter your values in the appsettings.json file. used my old version and it got past that error, now a new error

when I click on the login button i get the following error:

IDispatcher required to call LoginAsync on MSAL provider (Parameter 'dispatcher')

this happens on the call to: var success = await _authentication.LoginAsync();

0

There are 0 best solutions below