New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

passport-saasform

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-saasform

Saasform authentication strategy for Passport

  • 0.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

passport-saasform

Passport strategy for authenticating via Saasform.

Tested on Node.js and serverless applications, Firebase Functions, AWS Lambda.

With Saasform you can separate user authentication and management from your core application. All user flows like registration, login, password reset, inviting other users to an account, etc. are handled by Saasform. When a user is signed in, Saasform issues a JWT token and redirects the user to your application. This Passport strategy helps you validate Saasform's token with ease.

Install

npm install passport-saasform

or

yarn add passport-saasform

Usage

Here's a minimal working example:

const express = require('express')
const app = express()

const passport = require('passport');
const SaasformStrategy = require('passport-saasform');

passport.use(new SaasformStrategy({
  // saasformUrl: 'https://beautifulsaas.com',
  // appBaseUrl: 'https://app.beautifulsaas.com',
}));

const auth = passport.authenticate('saasform', { session: false });

app.get('/', auth, (req, res) => {
  res.send(`Hello ${req.user.email}!`)
})

app.listen(3000, () => {
  console.log(`Minimal example app`)
})

Contribute

We welcome any type of contribution: code, bugs, feature requests... Oh, and tests!

Keywords

FAQs

Package last updated on 21 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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