SendOtpDev
Welcome to SendOtpDev! This gem allows you to easily send and confirm One-Time Passwords (OTP) for email, SMS, or voice authentication.
Installation
Add this line to your application's Gemfile:
gem 'send_otp_dev'
And then execute:
bundle install
Or install it yourself as:
gem install send_otp_dev
Usage / Configuration
To use the SendOtpDev gem, you'll need to configure it using your API key with an initializer in your Rails application:
SendOtpDev.configure do |config|
config.api_key = 'your_sendotp.dev_api_key'
end
Then, you can send an OTP like so:
SendOtpDev::Client.send_otp(email: 'user@example.com', phone_number: '1234567890', app_name: 'YourAppName')
You can also confirm an OTP like so:
SendOtpDev::Client.confirm_otp(token:1234, email: 'user@example.com', phone_number: '1234567890', app_name: 'YourAppName')