Comparing version 0.0.12 to 0.0.13
var ExpressRouter = require('express').Router, | ||
request = require('superagent'), | ||
jwt = require('jwt-simple') | ||
config = require('./config') | ||
jwt = require('jwt-simple'), | ||
config = require('./config'), | ||
errors = require('./errors'); | ||
@@ -16,14 +16,16 @@ | ||
// map out routes for all of the ready-to-use forms | ||
['login', 'signup'].forEach(function(form) { | ||
router.get('/authbase/' + form, function(req, res) { | ||
console.log(config.url + '/forms/' + form) | ||
request.get(config.url + '/forms/' + form) | ||
.set('X-App-Id', options.appId) | ||
.set('X-App-Secret', options.appSecret) | ||
.buffer() | ||
.end(function(response) { | ||
res.status(response.status).send(response.text); | ||
}); | ||
['login', 'signup', 'reset-password', 'change-password', 'change-email'] | ||
.forEach(function(form) { | ||
router.get('/authbase/' + form, function(req, res) { | ||
request.get(config.url + '/forms/' + form) | ||
.query({stylesheets: options.stylesheets}) | ||
.query({email: req.query.email}) | ||
.set('X-App-Id', options.appId) | ||
.set('X-App-Secret', options.appSecret) | ||
.buffer() | ||
.end(function(response) { | ||
res.status(response.status).send(response.text); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -35,3 +37,3 @@ router.get('/authbase/return', function(req, res, next) { | ||
// Everything is ok! Officially authenticated! | ||
// Everything is OK - officially authenticated! | ||
res.locals.authbaseId = decoded.sub; | ||
@@ -38,0 +40,0 @@ options.onAuthenticated(req, res); |
{ | ||
"name": "authbase", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "AuthBase API Client and Router", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16445
456
0