Skip to content

emilrb/Parse-Server-Authy-Adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse Server Authy Adapter

Allows your Parse Server to authenticate users using Twilio Authy One-Time Passwords (OTPs)

Installation

  1. On your parse server config folder run npm install parse-server-authy-adapter

  2. Go to https://www.twilio.com/console/authy/applications/, get your API key.

  3. Follow the steps on the guide.

    {
    	.
    	.
    	.
    	auth: {
    		authy: {
    			module: 'parse-server-authy-adapter',
    			apiKey: 'your-api-key',
    		}
    	},
    }

Usage

  1. Follow Authy's instructions to receive an OTP

  2. POST to /users on parse-server the following payload

    {
    	"authData": {
    		"authy": {
    			"id": "authy-user-id",
    			"otp": "one-time-password"
    		}
    	}
    }

    Curl example:

    curl -X POST -H "Content-Type: application/json" \
    -H "X-Parse-Application-Id: myAppId" -d '{ \
    	"authData": { \
    		"authy": { \
    			"id": "authy-id", \
    			"otp": "authy-otp" \
    		} \
    	} \
    }' "http://example.com/parse/users"
    

    Response:

    {
    	"objectId": "...",
    	"createdAt": "...",
    	"username": "...",
    	"sessionToken": "..."
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published