@nodefony/passport-wrapper

Nodefony Framework Passport strategy wrapper

Stats

StarsIssuesVersionUpdatedCreatedSize
@nodefony/passport-wrapper
004.0.03 years ago3 years agoMinified + gzip package size for @nodefony/passport-wrapper in KB

Readme

nodefony-passport

Passport Strategy connector to Nodefony Framework

####- Nodefony Documentation
####- Nodefony Demo

####- Passport authentication middleware for Node.js.

By default, Passport exposes middleware that operate using Connect-style middleware using a fn(req, res, next) signature. Nodefony framework have different expectations, and this connector allows Passport to be adapted to operate within nodefony environment.

EXAMPLE STRATEGY passport-local

####- Passport strategy for authenticating with Local

ROUTING NODEFONY with passport-local

local-Area: 
  pattern:  /local
  defaults: {controller: "frameworkBundle:default:401"}

FIREWALL NODEFONY with passport-local

local_area:
  pattern:                    ^/local
  provider:                   nodefony
  form_login:
    login_path:               /login/passport-local
    default_target_path:      /
  passport-local:
    usernameField: 'email'
    passwordField: 'passwd'
  context:                    ~
  redirectHttps:              true

EXAMPLE STRATEGY passport-google-oauth

####- Passport strategy for authenticating with Google Api

ROUTING NODEFONY with passport-google-oauth


google-Area: 
  pattern:  /auth/google
  defaults: {controller: "frameworkBundle:default:401"}

googleCallBack-Area: 
  pattern:  /auth/google/callback
  defaults: {controller: "frameworkBundle:default:401"}

FIREWALL NODEFONY with passport-google-oauth

github_area:
  pattern:                    ^/auth/google
  provider:                   nodefony
  form_login:
    default_target_path:      /
    check_path:               /auth/google
  passport-google-oauth20:
    clientID:                 'GOOGLE_CLIENT_ID'
    clientSecret:             "GOOGLE_CLIENT_SECRET" 
    callbackURL:              "https://domain.com/auth/google/callback" 
    scopes:                   [ 'profile','email' ]
  context:                    google
  crossDomain: 
    allow-origin:          {"google":"accounts.google.com"}
      Access-Control:         {
        "access-control-allow-methods":"GET",
      }

EXAMPLE STRATEGY Passport-GitHub2

####- Passport strategy for authenticating with GitHub

ROUTING NODEFONY with Passport-GitHub2


github-Area: 
  pattern:  /auth/github
  defaults: {controller: "frameworkBundle:default:401"}

githubCallBack-Area: 
  pattern:  /auth/github/callback
  defaults: {controller: "frameworkBundle:default:401"}

FIREWALL NODEFONY with Passport-GitHub2

github_area:
  pattern:                    ^/auth/github
  provider:                   nodefony
  form_login:
    default_target_path:      /
    check_path:               /auth/github
  passport-github2:
    clientID:                 'GITHUB_CLIENT_ID'
    clientSecret:             "GITHUB_CLIENT_SECRET" 
    callbackURL:              "https://domain.com/auth/github/callback" 
    scopes:                   [ 'user:email' ]
  context:                    github
  crossDomain: 
    allow-origin:          {"github":"github.com"}
      Access-Control:         {
        "access-control-allow-methods":"GET",
      }

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.