In my current blazor webassembly project I used the google authenticator. It is very simple to implement in Blazor web assembly. So i am making small blog post on this topic.
Step 1: Create the Blazor standalone project like this
This will create the all boilerplate code related with authentication and authorization.
Step 2: Create a Google API Console project to obtain a client ID and client secret to configure the Google authentication in our application.
Follow the instruction as given below URL
and create the credentials like this
Step 3: Go to appsettings.json file and keep the required configuration like this
After authentication, It will come to our blazor application like this
We saw that with help of microsoft.aspnetcore.components.webassembly.authentication package. It is very simple to implement third party authentication in our blazor web assembly application.
Hello, thanks a lot for your tutorial.
It is a great help. Is there any way to use Google and Microsoft login together in Blazor Webassembly? Have a good day.
Yes, if you will use Azure B2C authentication, we will get options to use all login service provider. I have plan to write blog post on this topic