Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 11, 2018. It is now read-only.

[MOVED] OAuth 2 plugin for feathers-authentication

License

NotificationsYou must be signed in to change notification settings

feathersjs-ecosystem/authentication-oauth2

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.

Build Status

An OAuth2 authentication strategy for feathers-authentication using Passport

Installation

npm install @feathersjs/authentication-oauth2 --save

Note: This is only compatibile withfeathers-authentication@1.x and above.

Quick example

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'])]}});

Documentation

Please refer to the@feathersjs/authentication-oauth2 API documentation for more details.

License

Copyright (c) 2018

Licensed under theMIT license.

About

[MOVED] OAuth 2 plugin for feathers-authentication

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors12


[8]ページ先頭

©2009-2025 Movatter.jp