- Notifications
You must be signed in to change notification settings - Fork14
[MOVED] OAuth 2 plugin for feathers-authentication
License
feathersjs-ecosystem/authentication-oauth2
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Important: The code for this module has been moved into the main Feathers repository atfeathersjs/feathers (package direct link). Please open issues and pull requests there. No changes in your existing Feathers applications are necessary.
An OAuth2 authentication strategy for feathers-authentication using Passport
npm install @feathersjs/authentication-oauth2 --saveNote: This is only compatibile withfeathers-authentication@1.x and above.
constfeathers=require('@feathersjs/feathers');constauthentication=require('feathers-authentication');constjwt=require('feathers-authentication-jwt');constoauth2=require('@feathersjs/authentication-oauth2');constFacebookStrategy=require('passport-facebook').Strategy;constapp=feathers();// Setup authenticationapp.configure(authentication(settings));app.configure(jwt());app.configure(oauth2({name:'facebook',Strategy:FacebookStrategy,clientID:'<your client id>',clientSecret:'<your client secret>',scope:['public_profile','email']}));// Setup a hook to only allow valid JWTs to authenticate// and get new JWT access tokensapp.service('authentication').hooks({before:{create:[authentication.hooks.authenticate(['jwt'])]}});
Please refer to the@feathersjs/authentication-oauth2 API documentation for more details.
Copyright (c) 2018
Licensed under theMIT license.
About
[MOVED] OAuth 2 plugin for feathers-authentication
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors12
Uh oh!
There was an error while loading.Please reload this page.
