Git Product home page Git Product logo

authy-ruby's Introduction

Gem Version Build Status Code Climate

Ruby Client for Twilio Authy Two-Factor Authentication (2FA) API

Documentation for Ruby 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 either of the Ruby Authy Quickstart in our docs:

Authy Ruby Installation

gem install authy

Usage

To use the Authy client, require the authy gem and initialize it with our API URI and your production API Key found in the Twilio Console:

require 'authy'

Authy.api_uri = 'https://api.authy.com'
Authy.api_key = 'your-api-key'

Rails users can put this in config/initializers and create a new file called authy.rb.

authy api key in console

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 Ruby support through the official Twilio helper libraries.

Legacy (V1) documentation here. Verify V1 is not recommended for new development. Please consider using Verify V2.

Demo

See the ./examples directory for a demo CLI application that uses the Authy API.

Contributing

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Add tests.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit.

Notice: Twilio Authy API’s Sandbox feature will stop working on Sep 30, 2021

Twilio is discontinuing the Authy API’s Sandbox, a feature that allows customers to run continuous integration tests against a mock Authy API for free. The Sandbox is no longer being maintained, so we will be taking the final deprecation step of shutting it down on September 30, 2021. The rest of the Authy API product will continue working as-is.

This repo previously used the sandbox API as part of the test suite, but that has been since removed.

You will only be affected if you are using the sandbox API in your own application or test suite.

For more information please read this article on how we are discontinuing the Twilio Authy sandbox API.

Copyright

Copyright (c) 2011-2021 Authy Inc. See LICENSE for further details.

authy-ruby's People

Contributors

bilalreffas avatar czarneckid avatar davidtoca avatar dcu avatar dja avatar dlackty avatar hannelita avatar hebo avatar ilyasgaraev avatar josh-authy avatar ksylvest avatar lucasvidal avatar luong-komorebi avatar marcioj avatar moisesvw avatar nneal avatar petergoldstein avatar philnash avatar plicjo avatar robinske avatar robinw777 avatar sarcilav avatar senekis avatar serargz avatar swarnava avatar tolsee avatar vikramjadon921995 avatar weppos 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.