Skip to main content

Posts

Showing posts with the label Asp.Net Core Identity

Part - 7 | Asp.Net Core Identity Series[.NET 7] | Twitter Authentication

The main objectives of this article are: Implementing Twitter Authentication. Install Twitter Authentication NuGet Package: Let's install the required package for Twitter authentication. Visual Studio 2022: Install-Package Microsoft.AspNetCore.Authentication.Twitter -Version 7.0.4 Visual Studio Code: dotnet add package Microsoft.AspNetCore.Authentication.Twitter --version 7.0.4 Register Our App 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. (Step 1) Register with 'Twitter Developers' section and then navigate to the dashboard page 'https://developer.twitter.com/en/portal/dashboard' (Step 2) Click on 'Create Poject' on the dashboard page. (Step 3) Specify the project name and then click on the 'Next' button. (Step 4) Select a use case and then click on the 'Next' button (Step 5) Provide some project description and then click o

Part - 6 | Asp.Net Core Identity Series[.NET 7] | Facebook Authentication

The main objective of this article is: Implementing Facebook Authentication Install Facebook Authentication NuGet Package: Let's install the required package for Facebook authentication. Visual Studio 2022: Install-Package Microsoft.AspNetCore.Authentication.Facebook -Version 7.0.4 Visual Studio Code: Install-Package Microsoft.AspNetCore.Authentication.Facebook -Version 7.0.4 Register Our App With Facebook: To enable Facebook authentication we have to register our API project with Facebook. So following are Facebook registration steps. (Step 1) Go to the Facebook developer page 'https://developers.facebook.com/apps/'. (Step 2) Go to the 'My Apps' menu and click on the 'Create App' button. (Step 3) In the 'Create An App' section, choose the 'Consumer' option and finally click on the 'Next' button. (Step 4) Enter a name for the 'Add an app name' and click on 'Create app'. (Step 5) On 'Add products to your app

Part-5 | Asp.Net Core Identity Series[.NET 7] | Google Authentication

The main objective of this article is: Implementing Google Authentication Install Google Authentication NuGet Package: Let's install the package required for google authentication. Visual Studio 2022: Install-Package Microsoft.AspNetCore.Authentication.Google -Version 7.0.3 Visual Studio Code: dotnet add package Microsoft.AspNetCore.Authentication.Google --version 7.0.3 Register With Google: We need to register our Razor Page application with Google to enable Google authentication. So following are the registration steps with Google. (Step 1) Go to Google API & Service could console at "https://console.cloud.google.com/projectselector2/apis/dashboard?supportedpurview=project" (Step 2) Click on the 'Create Project' button. (Step 3) Give a project name and then click on the 'Create' button. (Step 4) On creating a project successfully, we can observe it as a selected project in our dashboard like below. (Step 5) Select 'OAuth Consent Screen' l

Part-4 | Asp.Net Core Identity Series[.NET 7] | Sending Two-Factor Authentication(2FA) Code To Phone

The main objectives of this article are: Sending Two-Factor Authentication(2FA) Code to Phone Enable Phone 2FA: In the Asp.Net Core Identity application to enable 'Phone' Two-Factor Authentication, ensure our 'AspNetUser' table following fields has appropriate data: PhoneNumber - Should have valid phone number along with country code PhoneNumberConfirmed - must be true TwoFactorEnabled - must be true Twilio Setup: Twilio is a third-party service provider which provides services like SMS, Voice Calls, Chats, etc. (Step 1) Go to the Twilio website 'https://www.twilio.com/' and SignUp. (Step 2) Now Login => We entered into the Twilio console dashboard => Here create a project and you will get 'Account SID', 'Auth Token', and 'My Twilio Phone Number(which will be our From Phone Number). (Step 3) I'm going to use the Free credits to set up the SMS service. So here is one limitation with free credits we have to register all testing &