Skip to main content

Posts

Showing posts with the label Dotnet Core

Part-2 A CRUD Operation Demo With .NET6 Web API | SQL Database | Angular13

The main objectives of this artice are: Creating Angular 13 Application. Install And Configure Bootstrap Add Bootstrap Menu Angular: Angular is a framework that can be used to build a single-page application. Angular applications are built with components that make our coding cleaner and maintainable. Angular component composes of 3 files Typescript File(*.ts), Html File (*.html), CSS File(*.css). Components typescript file and HTML file support 2-way binding which means data transfer is bi-directional. Component typescript file listens for all HTML elements events from the Html file. Create Angular(v13) Application: Let's create an Angular(v13) application to begin our sample. Make sure to install the Angular CLI tool into our local because it provides easy CLI commands to play with the angular application or to set up the application. Command To Install CLI: npm install -g @angular/cli Run the below command to create an angular application. ng new name-of-your-project

Part-5 Blazor WebAssembly Cookie Authentication With Google Account

In this article, we are going to implement Blazor WebAssembly cookie authentication using Google. Part-4 Blazor WebAssembly Cookie Authentication With Microsoft Account Install Google Authentication NuGet In API Project: Let's install the Google Authentication NuGet package into our API Project .NET CLI Command: dotnet add package Microsoft.AspNetCore.Authentication.Google --version 6.0.3 Package Manager: Install-Package Microsoft.AspNetCore.Authentication.Google -Version 6.0.3 Register API With Google: We need to register the API project with Google to enable Google authentication. So following are the registration steps with Google. Step1: Goto  'Google APIs&Services' at 'https://console.cloud.google.com/projectselector2/apis/dashboard' Step2: Click the 'Create Project' button. Stpe3: Now define the project name and then click on the 'Create' button. Step4: On creating a project successfully, we can observe it as a selected project in ou

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-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