Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

authbase

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

authbase - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

30

lib/router.js
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc