Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 975
Bill Shaw Avatar asked Jan 01 '26 08:01

Bill Shaw


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.

like image 196
Sijmen Koffeman Avatar answered Jan 03 '26 15:01

Sijmen Koffeman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!