Skip to main content

Posts

Part-4 Blazor WebAssembly Cookie Authentication With Microsoft Account

In this article, we are going to implement Blazor WebAssembly cookie authentication using Microsoft Account(external login provider). Part-3 Blazor WebAssembly Cookie Authentication With Twitter Install Microsoft Authentication NuGet Package In API Project: Let's install the Microsoft authentication NuGet Package in API project. .NET CLI Command: dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount --version 6.0.3 Package Manager: Install-Package Microsoft.AspNetCore.Authentication.MicrosoftAccount -Version 6.0.3 Register API With Microsoft Azure Portal: To enable Microsoft authentication to our application, we have to register our app into the Microsoft Azure portal. So following are steps to registering the app with the Microsoft portal. Step1: Go to the Azure portal 'https://portal.azure.com/'. Then select 'App Registration'. Step2: In the 'App Registration' page select the 'New Registration' button. Step3: Configure the

Part-3 Blazor WebAssembly Cookie Authentication With Twitter

In this article, we are going to implement Blazor WebAssembly cookie authentication with Twitter(external login provider). Click here for Part-2 Blazor WebAssembly Cookie Authentication With Facebook Install Twitter NuGet In API Project: Let's install the Twitter authentication library into the API project. .NET CLI Command: dotnet add package Microsoft.AspNetCore.Authentication.Twitter --version 6.0.3 Package Manager: Install-Package Microsoft.AspNetCore.Authentication.Twitter -Version 6.0.3 Register API With Twitter: To enable twitter authentication to our application we have to register our API with Twitter. So following are steps to register with Twitter. Step1: Register with 'Twitter Developers' section and then navigate to the dashboard page  https://developer.twitter.com/en/portal/dashboard. Step2: Click 'Create Project' on the dashboard page. Step3: Specify Project Name, then click on the 'Next' button. Step4: Select any use case in the dropdo

Part-2 Blazor WebAssembly Cookie Authentication With Facebook

In this article, we are going to implement Blazor WebAssembly cookie authentication with Facebook(external login provider). Click here for - Part-1 Blazor WebAssembly authentication with .net core cookie. Install Facebook NuGet In API Project: Let's install the Microsoft Facebook Authentication package. .NET CLI Command: dotnet add package Microsoft.AspNetCore.Authentication.Facebook --version 6.0.3 Package Manager: Install-Package Microsoft.AspNetCore.Authentication.Facebook -Version 6.0.3 Register API Wih Facebook: To enable Facebook authentication we have to register our API project with Facebook. So following are facebook registration steps. Step1: Go to the Facebook Developer page at "https://developers.facebook.com/apps/". Step2: Go to the 'My Apps' menu and click on the 'Create App' button. Step3: In the 'Create An App' section, choose the 'Consumer' option and then click on the 'Next' button. Step4: In the 'Detail

Part-1 Blazor WebAssembly Cookie Authentication[.NET 6]

In this article, we are going to authenticate our Blazor WebAssemably application with simple Asp.NetCore cookie. Targets Of Blazor WebAssembly Cookie Auth Series: Let's have look at this Blazor WebAssmbly series: Part -1 is simple asp.net core cookie authentication. Part-2 is cookie authentication with FaceBook. Part-3 is cookie authentication with Twitter. Part-4 is cookie authentication with Google. Part-5 is cookie authentication with Microsoft. Blazor WebAssembly Cookie Authentication Flow: We must have 2 applications 'Blazor WebAssembly Application'(which runs on the user browser), and 'Asp.Net Core API'(which runs on the server). Blazor WebAssembly requests the API for user authentication by sending the user credentials to API. For valid credentials, API generates auth cookie and sends it to the client application. So after successful authentication of every request from Blazor WebAssembly to API, the auth cookie will be attached to every subsequent request