OTP Login
Tiniyo configurations

Features

This module will allow you to register/login to a site just using mobile number/OTP sent to the provided mobile number.

Requirements

  • sms and sms_user modules that are part of smsframework module and dynamic_entity_reference module.
  • basic_auth, restui, rest and serialization (Only if you want to use
    OTP LOGIN AS A SERVICE)

Installation

Install as usual. See http://drupal.org/node/1897420 for further information.

Configurations

  1. Go to '/admin/config/people/otp_login' to configure OTP login related settings
    • Enable 'Activate OTP Login' to enable OTP login.
    • Choose OTP Platform.
      1. SMS Framework
        • With 'SMS framework', you can use any supported gateway to send OTP.
      2. Tiniyo API
        • You can use Tiniyo API to send OTP. For this, you need to do below mentioned configurations.
          • Enter 'Tiniyo Key (AuthID)'
          • Enter 'Tiniyo Secret (AuthSecretID)'
          • Choose how you want to send OTP. Through SMS, Voice call or Both.
          • Choose length of OTP
        • Note: 'Tiniyo Key (AuthID)' and 'Tiniyo Secret (AuthSecretID)' can be found under https://tiniyo.com/accounts/home when you are logged in.
        • In case of Tiniyo, OTP will be sent immediately. No cron setup needed.
    • If you want to purge users who have been blocked / not logged-in for a specific number of days, enable the provided checkbox and enter number of days.
    • If you want to purge blocked / never logged-in users at any moment, click on tab 'OTP login - purge users' (/admin/config/people/otp_login/user_purge) and press button 'Purge users'.
    • By default OTP expire time is set to 30 mins. You can change it, if needed.
    • Please note that, you will have to setup cron for OTP expiry functionality to work.

Place the 'OTP login link' block:
Go to '/admin/structure/block' and place 'OTP login link' block to your prefered region.
The link block will be shown only to anonymous users and if 'Activate OTP Login' is enabled.

In addition, also configure settings related to smsframework module.

  1. Go to '/admin/config/smsframework/settings' to configure 'Fallback gateway' and 'Phone verification path'.
  2. Go to '/admin/config/smsframework/gateways' to add new gateway.
  3. Go to '/admin/config/smsframework/phone_number' to add phone number settings (optional):
    • Click on 'Add phone number settings' button.
    • Select 'user' bundle.
    • Under 'Field mapping' -> 'Phone number' select 'Create a new telephone field'.
      A verification code will be sent to user (in addition to OTP), which the user can verify on __SITE_URL__/verify
    • You can choose to keep everything else as-is.

Please note that, you will have to setup cron, so that OTP and sms verification code is sent to user mobile number.

If you want to use OTP LOGIN AS A SERVICE:

  1. Go to '/admin/config/services/rest'.
  2. Enable 'Generate OTP', 'Submit OTP' and 'Logout OTP' resources.

Use OTP LOGIN as a service

You can use functionalities of this module as a service, so that it can be used with your mobile app, for example.
Please refer README txt for details.

Credits

* Mandar Bhagwat
* Shailesh Bhosale

Supporting organizations: 

Project information

Releases