Git Product home page Git Product logo

authy.net's Introduction

This library is no longer actively maintained. Please visit the Twilio Docs for Authy / .NET usage documentation or consider using Twilio Verify with Twilio's .NET helper library for your SMS verification needs.

Forked and patched from the library of devinmartin in https://bitbucket.org/devinmartin/authy.net/wiki/Home

Authy .NET

Documentation for .NET usage of the Authy API lives in the official Twilio documentation.

The Authy API supports multiple channels of 2FA:

  • One-time passwords via SMS and voice.
  • Soft token (TOTP via the Authy App)
  • Push authentication via the Authy App

If you only need SMS and Voice support for one-time passwords, we recommend using the Twilio Verify API instead.

More on how to choose between Authy and Verify here.

Authy Quickstart

For a full tutorial, check out the .NET Authy Quickstart in our docs:

2FA Workflow

  1. Create a user
  2. Send a one-time password
  3. Verify a one-time password

OR

  1. Create a user
  2. Send a push authentication
  3. Check a push authentication status

Phone Verification

Phone verification now lives in the Twilio API and has C#/.NET support through the official Twilio helper libraries.

Verify V1 is not recommended for new development. Please consider using Verify V2.

Authy.NET installation

Note: this library is no longer actively maintained and may be incompatible with the version of .NET in your project. The documentation above will point you to maintained libraries and code samples.

With the Visual Studio IDE:

Install-Package Authy.Net

OR

With .NET Core command line tools:

dotnet add package Authy.Net

Usage

To use the Authy client, create an instance of AuthyClient and initialize it with your production API Key found in the Twilio Console:

using Authy.Net;

var client = new AuthyClient("your_api_key", test:false);

authy api key in console

All of the methods return a result object specific to the call. There is always a Status property and a RawResponse property. The raw response can be used to get additional information when debugging problems but generally isn't needed in actual code.

Response statuses are:

  1. Success
  2. BadRequest
  3. Unauthorized
    • This can mean that your API key is invalid or that the provided token is invalid. Once your integration has been tested it likely means that the token is invalid but the raw response will provide more info.
  4. ServiceUnavailable

Copyright

Copyright (c) 2015-2020 Authy Inc. See LICENSE.txt for further details.

authy.net's People

Contributors

acamino avatar devinmartin avatar robinske avatar senekis avatar serargz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.