Coder Social home page Coder Social logo

vonage-rails-devise-2fa-demo's Introduction

Vonage Rails Devise 2fa Demo

公式のチュートリアル『Two-factor authentication for security and spam prevention』をDocker化したVonage Verify APIによる2FAのサンプルアプリケーションです。

アプリケーション起動方法

$ docker-compose up -d

2FAデモの実施方法

APIキーとシークレットキーの登録

.envファイルにVONAGE_API_KEYVONAGE_API_SECRETをセットします。 APIキーとAPIシークレットはVonageアカウント作成後、ダッシュボード画面で確認できます。

アカウントの作成

http://localhost:3000/users/sign_upにアクセスし、アカウントを作成します。

sign_up

電話番号をユーザー情報に追加

http://localhost:3000/users/editにアクセスし、アカウントに電話番号の情報を追加します。 フォーマットはE164ですので例えば09012345678であれば+819012345678のようになります。

edit_user

認証コードをデバイスで確認する

ユーザー情報更新後、認証コードの入力画面に遷移するとともにデバイスに認証コードが送られます。

verify

認証コードの入力

デバイスに送られてきた認証コードを入力します。

verify

認証結果の確認

http://localhost:3000/にリダイレクトされればOKです。

root_page

DB接続方法

$ docker-compose exec db mysql -uwebuser -pwebpass -D vonage_rails_devise_2fa_demo_development;

Railsコンソール接続方法

$ docker-compose exec app rails c

vonage-rails-devise-2fa-demo's People

Contributors

nishina555 avatar

Watchers

 avatar  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.