GregBaugues / authy2fa-csharp

Two Factor Authentication example app in C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two-Factor Authentication with Authy in ASP.NET MVC

This example application demonstrates how to use Authy as the two-factor authentication provider in an ASP.NET MVC project using ASP.NET Identity.

For more information on how this code works, check out our interactive code walkthrough.

Local Development

  1. First clone this repository and cd into its directory:

    git clone git@github.com:TwilioDevEd/authy2fa-csharp.git
    
    cd authy2fa-csharp
    
  2. Create a new file Authy2FA/Local.config and update the content with:

    <appSettings>
      <add key="webpages:Version" value="3.0.0.0" />
      <add key="webpages:Enabled" value="false" />
      <add key="ClientValidationEnabled" value="true" />
      <add key="UnobtrusiveJavaScriptEnabled" value="true" />
      <add key="AuthyKey" value="your authy production key" />
    </appSettings>
    
  3. Build the solution.

  4. Run Update-Database at Package Manager Console to execute the migrations.

  5. Run the application.

  6. Check it out at http://localhost:49217

That's it!

To let Authy OneTouch to use the callback endpoint you exposed, your development server will need to be publicly accessible. We recommend using ngrok to solve this problem.

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

About

Two Factor Authentication example app in C#

License:MIT License


Languages

Language:C# 85.7%Language:JavaScript 9.5%Language:HTML 4.3%Language:CSS 0.4%Language:ASP 0.1%