Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

core.io-express-auth

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core.io-express-auth

Module providing Passport.js auth for express

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

core.io-auth

Routes

  • GET /login: Show login form.

  • POST /login: Handle local strategy login.

  • GET /logout: Destroy session.

  • GET /signup: Show signup form.

  • POST /signup:

  • GET /auth/:

  • POST /register: 'UserController.create',

  • POST /logout: 'AuthController.logout',

  • POST /auth/local: 'AuthController.callback',

  • POST /auth/local/:action: 'AuthController.callback',

  • POST /auth/:provider: 'AuthController.callback',

  • POST /auth/:provider/:action: 'AuthController.callback',

  • GET /auth/:provider: 'AuthController.provider',

  • GET /auth/:provider/callback: 'AuthController.callback',

  • GET /auth/:provider/:action: 'AuthController.callback'

Custom Error views

If our sub-app has the following view structure:

.
├── views
│   ├── error-layout.ejs
│   ├── 401.ejs
│   └── 403.ejs

The error view will be rendered with the following locals:

let locals = {
    isErrorView: true,
    status: status,
    message: err.message,
    error: err
};

TODO

  • Integrate with sockets.io
  • Manage locals index.js L-482
  • Pull routes from config
  • Normalize config:
    • config.passport -> config.auth | config
  • Make filters so that we handle restrictToDomain as a generic filter
    • i.e check that a user who's been banned doesn't log in again.
  • Check how we should use scope in oAuth2 to restrict by domain.

Keywords

core.io

FAQs

Package last updated on 23 Jan 2018

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