How do you implement external authentication for multiple identity providers in Blazor WASM?

Viewed 789

I’m trying to implement external authentication for a Blazor WASM app using multiple external identity providers (Google, Microsoft, Facebook, Twitter). Ideally the login page would show a button for each IP.

It looks like it should be dead simple using the Authentication tools provided and a couple of sites (Okta, Auth0) give excellent instructions on how to implement external authentication for one IP. However, I haven’t been able to find any information about how to implement external authentication for two or more IPs.

I tried the simple-minded approach of calling AddOidcAuthentication twice in Program.cs, once for each provider, and including the information for both providers in appsettings.json, but the login page only displays one of them (of course).

Microsoft’s documentation doesn’t seem to cover this scenario.

1 Answers

You could implement your own identityserver, utilizing external auth providers. E.g. Orchard Core comes out of the box with Google, Twtitter, Facebook and Azure.

Related