Support » Plugins » Two factor authentication Plugin Contribution

  • Hi,

    Need your contribution.
    I want to create Two-factor Authentication plugin for WordPress by using the following API.

    You can check more details on https://sendotp.msg91.com/doc

    The verification request is initiated by calling the generateOTP API directly from the client end. The OTP message is then sent on client’s mobile number.

    Base URL: POST: https://sendotp.msg91.com/api/generateOTP

    Header: application-Key (YOUR APPLICATION_KEY)

    body
    {
    “countryCode”: “91”,
    “mobileNumber”: “9898XXXXXX”,
    “getGeneratedOTP”: true
    }
    _____________________
    response
    {
    “status”: “success”,
    “response”: {
    “code” : “OTP_SENT_SUCCESSFULLY”,
    “oneTimePassword” : “Your one time password.”
    }
    }
    ______________________

    API (Verify OTP)

    Base URL POST: https://sendotp.msg91.com/api/verifyOTP

    Header: application-Key (YOUR APPLICATION_KEY)

    body
    {
    “countryCode”: “91”,
    “mobileNumber”: “9898XXXXXX”,
    “oneTimePassword”: “12345”
    }
    ______________________
    response
    {
    “status”: “success”,
    “response”:{
    “code”:”NUMBER_VERIFIED_SUCCESSFULLY”,
    “refreshToken”:”Refresh token to check the validity later.”
    }
    }

    I am not a developer and I even don’t know how to create plugin. Please help.

Viewing 1 replies (of 1 total)
  • If you are not a developer and if you do not know how to develop a plugin, you should try to use existing components.

    You may take a look at my plugin for two factor authentication. This authenticates against the backend privacyIDEA. privacyIDEA manages all tokens and in your case it would forward the authentication request to the SMS OTP provider to trigger the sending of the SMS.

    Or you can take a look at the above mentioned plugin, to get an idea how your plugin should work. In this method you can see, how the API request is performed via wp_remote_post. You would have to create similar requests for triggering the SMS and for validating the SMS.

    • This reply was modified 7 years, 6 months ago by cornelinux.
Viewing 1 replies (of 1 total)
  • The topic ‘Two factor authentication Plugin Contribution’ is closed to new replies.