
/* Login with OTP - Complete Moodle Auth Plugin */


: Instructions :
1) Install the plugin into your moodle site.

2) Go to 'Manage authentication' (http://your_moodle_site/admin/settings.php?section=manageauths)

3) Enable 'Login with OTP' by clicking the key icon.

4) Go to 'Login with OTP Settings' (http://your_moodle_site/admin/settings.php?section=authsettingotpbasedregandlogin) by clicking on the 'settings' link.

5) Please Configure properly otherwise Login with OTP button will not appare on login page.

Well Done! Your plugin is new ready to use.


*I am also customize your signup or registration page and add a required mobile no feild that helps new users to register their mobile no.



: Working Flow :
For new users => New users have to register themself by create new account where thay have to give their mobile no too.

For existing Users => Existing Users have to add their mobile no from edit profile section ( Mobile phone ).

Than, when a user want to login through OTP verification.
first goto login page -> click on 'Login with OTP' button -> a new page open where user have to select their country code and enter their register mobile no -> once mobile no validation complete with no fault than a OPT was send to user's mobile no and a new submit OTP page opens -> Once user submit their OTP it checks that the OTP is valid or not. If valid than the user logged in otherwise user will get an OTP verification failed error. 


NOTE : Different users can't use same mobile no. 


Thank You !