Skip to content

Instantly share code, notes, and snippets.

@CodisRedding
Forked from rahatarmanahmed/formio-auth.js
Last active August 8, 2016 20:20
Show Gist options
  • Save CodisRedding/3ce7b9fdc65f6a69135727900c4e8316 to your computer and use it in GitHub Desktop.
Save CodisRedding/3ce7b9fdc65f6a69135727900c4e8316 to your computer and use it in GitHub Desktop.
Authentication Example.
var request = require('request');
request.post(
'https://formio.form.io/user/login',
{
data: {
'email': email,
'password': 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