4.4.1 • Published 4 years ago

feathers-sso v4.4.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Welcome to wings4!

A FeathersJS Single Sign-On for any frontend framework

Join and support our Community Web and Mobile Developers PH [ Facebook Page | Group ]

Single Sign-On (Backend)

npm install feathers-sso

or

yarn add feathers-sso
// authentication.js
const { LocalStrategy } = require('@feathersjs/authentication-local');
const { expressOauth } = require('@feathersjs/authentication-oauth');
const Sso = require('feathers-sso')

module.exports = app => {
  const authentication = new AuthenticationService(app);

  authentication.register('jwt', new JWTStrategy());
  authentication.register('local', new LocalStrategy());
  authentication.register('sso', new Sso('http://localhost:3030'));

  app.use('/authentication', authentication);
  app.configure(expressOauth());
};

Single Sign-On (Frontend)

enables SSO to specific iframe parent host

// SSO login UI
app.enableSSO([
  'http://localhost:8080', 
  'http://localhost:3030'
])

authenticate using SSO specifying the URL of SSO login UI

// Connecting Client App to SSO login UI
app.authenticateSSO('http://localhost:8080/#/auth')

Join and support our Community Web and Mobile Developers PH [ Facebook Page | Group ]