Socket
Socket
Sign inDemoInstall

@feathersjs/authentication-oauth1

Package Overview
Dependencies
5
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @feathersjs/authentication-oauth1

A Feathers OAuth1 authentication strategy


Version published
Weekly downloads
23
decreased by-14.81%
Maintainers
4
Install size
257 kB
Created
Weekly downloads
 

Readme

Source

@feathersjs/authentication-oauth1

Build Status Dependency Status Download Status

A Feathers OAuth1 authentication strategy

Installation

npm install @feathersjs/authentication-oauth1 --save

Quick example

const feathers = require('@feathersjs/feathers');
const authentication = require('feathers-authentication');
const jwt = require('feathers-authentication-jwt');
const oauth1 = require('@feathersjs/authentication-oauth1');
const session = require('express-session');
const TwitterStrategy = require('passport-twitter').Strategy;
const app = feathers();

// Setup in memory session
app.use(session({
  secret: 'super secret',
  resave: true,
  saveUninitialized: true
}));

// Setup authentication
app.configure(authentication(settings));
app.configure(jwt());
app.configure(oauth1({
  name: 'twitter',
  Strategy: TwitterStrategy,
  consumerKey: '<your consumer key>',
  consumerSecret: '<your consumer secret>'
}));

// Setup a hook to only allow valid JWTs to authenticate
// and get new JWT access tokens
app.service('authentication').hooks({
  before: {
    create: [
      authentication.hooks.authenticate(['jwt'])
    ]
  }
});

Documentation

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

License

Copyright (c) 2018

Licensed under the MIT license.

Keywords

FAQs

Last updated on 26 Jan 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc