Cognalys Ruby Gem
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
cognalys.gemspec

README.md

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