Forked from randallknutson/gist:bbe8dd3099234a73c716
Last active
September 18, 2015 15:21
-
-
Save zackurben/51ee9b92c26ad8a7c290 to your computer and use it in GitHub Desktop.
User Authentication Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
request.post( | |
'https://{projectname}.form.io/api/{userresource}/{loginform}/submission', | |
{ | |
data: { | |
'{userresource}.{emailfield}': email, | |
'{userresource}.{passwordfield}': password | |
} | |
}, | |
function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
token = res.headers['x-jwt-token']; | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment