GithubHelp home page GithubHelp logo

isabella232 / authy-form-helpers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twilio/authy-form-helpers

0.0 0.0 0.0 445 KB

Authy javascripts and css file to help create quick forms for the authy api

Ruby 4.36% CoffeeScript 59.64% CSS 36.01%

authy-form-helpers's Introduction

Authy Forms Helpers

This javascripts and stylesheets help you build your Registration and Verification forms to use Authy quicker. They include:

  1. An awesome countries dropdown that selects between country name and country code

  2. Some javascripts validations on tokens and cellphones

  3. A tooltip you can use to add a help message when you ask for the token

CDN

You can copy manually the javascripts and stylesheets into your project or you can simply use authy website to serve them:

Compressed CSS: https://www.authy.com/form.authy.min.css"
Compressed JS: https://www.authy.com/form.authy.min.js"

Add this in your HTML <head>

<link href="https://www.authy.com/form.authy.min.css" media="screen" rel="stylesheet" type="text/css">
<script src="https://www.authy.com/form.authy.min.js" type="text/javascript"></script>

or you can use CloudFlare CDN:

Compressed CSS: //cdnjs.cloudflare.com/ajax/libs/authy-form-helpers/2.3/form.authy.min.css
Compressed JS:  //cdnjs.cloudflare.com/ajax/libs/authy-form-helpers/2.3/form.authy.min.js

<link href="//cdnjs.cloudflare.com/ajax/libs/authy-form-helpers/2.3/form.authy.min.css" media="screen" rel="stylesheet" type="text/css">
<script src="//cdnjs.cloudflare.com/ajax/libs/authy-form-helpers/2.3/form.authy.min.js" type="text/javascript"></script>

Registration form (user enabling two factor)

In this form you need the country code and the user cellphone

Get the Countries Dropdown:

Add authy-countries id to the Country input.

<select id="authy-countries"></select>

To see a demo open sample/register.html and look at the Country input.

Display the country code as number

Add data-show-as="number" to the Country input.

<select id="authy-countries" data-show-as="number"></select>
Set the default country code

Add data-value="+{country_code}" to the Country input.

<select id="authy-countries" data-value="+57"></select>
Cellphone validations:

Add authy-cellphone id to the cellphone input.

<input id="authy-cellphone"  type="text" value=""/>

To see a demo open sample/register.html and look at the cellphone input.

Two-factor verification form

On this form the user enters his token which he gets from his cellphone

Token validation

To see a demo open sample/login.html and look at the cellphone input.

Add authy-token id to the input.

<input id="authy-token"  type="text" value=""/>

To see a demo open sample/login.html and look at the cellphone input.

Authy input logo

To see a demo open sample/login.html and look at the cellphone input.

Add authy-token id to the input.

<input id="authy-token"  type="text" value=""/>

To see a demo open sample/login.html and look at the cellphone input.

Help tooltip

First set the help message you want:

var authyUI = Authy.UI.instance();
authyUI.setTooltip("Two-Factor", "Get this token from your cellphone");

Add authy-help id to the link.

<a href="#" id="authy-help">help</a>

To see a demo open sample/login.html and look at the cellphone input.

Need help?

Contact us via https://support.authy.com

Copyright

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

authy-form-helpers's People

Contributors

dcu avatar hafichuk avatar moisesvw avatar plasma avatar sarcilav avatar securitysimon avatar senekis avatar serargz avatar strml 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.