OAuth Login with Phone number or Email address

Selvi Jp 1 Reputation point
2021-04-29T11:10:53.937+00:00

Hi Techie,

How to login with Phonenumber or Email address using Oauth ?

92566-image.png

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,649 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chao Deng-MSFT 796 Reputation points
    2021-04-30T09:31:35.337+00:00

    Hi @Selvi Jp ,
    You can follow the steps below to log in by email.

    1. Create a new empty ASP.NET Web project.
    2. In the Package Manager Console, enter the following the following commands:
      Install-Package SendGrid
      Install-Package -Prerelease Microsoft.AspNet.Identity.Samples
      In this tutorial, we'll use SendGrid to send email and Twilio or ASPSMS for sms texting. The Identity.Samples package installs the code we will be working with.

    3.Set the project to use SSL.
    4.Optional: Follow the instructions in my Email confirmation tutorial to hook up SendGrid and then run the app and register an email account.
    5.*Optional: *Remove the demo email link confirmation code from the sample (The ViewBag.Link code in the account controller. See the DisplayEmail and ForgotPasswordConfirmation action methods and razor views ).
    6.Optional: *Remove the ViewBag.Status code from the Manage and Account controllers and from the *Views\Account\VerifyCode.cshtml and Views\Manage\VerifyPhoneNumber.cshtml razor views. Alternatively, you can keep the ViewBag.Status display to test how this app works locally without having to hook up and send email and SMS messages.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    ChaoDeng

    0 comments No comments