sobinsunny / cognalys-ruby

Cognalys Ruby Gem

Home Page:https://www.cognalys.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cognalys-ruby (GEM)

International mobile number verification without an SMS gateway ( GEM ).

Initial Step:

Grab app_id,token by creating an account on (https://www.cognalys.com) .

Installation

Add this line to your application's Gemfile:

gem 'cognalys'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cognalys

Configure

    #config/initializers/cognalys.rb
    Cognalys.setup(app_id,token)

Usage

To request validation

    require 'cognalys'
    cognalys = Cognalys::Request.new
    cognalys.request_verification( :mobile => phone )

To verify OTP

    require 'cognalys'
    cognalys = Cognalys::Request.new
    cognalys.validate_otp( :keymatch => key_match, :otp => full_otp )

Contributing

  1. Fork it ( https://github.com/cognalys/cognalys-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Cognalys Ruby Gem

https://www.cognalys.com

License:MIT License


Languages

Language:Ruby 100.0%