Created
January 12, 2018 00:00
-
-
Save daydream05/3c9558ebf89db2a3f24706c5071ad19a to your computer and use it in GitHub Desktop.
don't use for production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::V1::PhoneVerificationsController < ApplicationController | |
def start | |
response = Authy::PhoneVerification.start(via: "sms", country_code: 1, phone_number: phone_number_params) | |
if response.ok? | |
# verification was started | |
render json: {"success": true, message: "Verification code was sent to your phone number"}, status: :ok | |
else | |
render json: response | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment