Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-evernote-auth

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-evernote-auth

Passport strategy for Evernote that includes request object passthrough.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
376
decreased by-5.76%
Maintainers
1
Weekly downloads
 
Created
Source

CircleCI

passport-evernote-auth

Passport strategy for Evernote that includes request object passthrough.

Installation

npm install passport-evernote-auth

Usage

Aside from the standard required fields, this module allows to optionally have passport include the express request object into the verification function (through the first variable), as well as a flag to indicate if you need to use the evernote sandbox

Parameters:

  • consumerKey - Evernote consumer key
  • consumerSecret - Evernote consumer secret
  • callbackURL - oauth callback url

Optional Parameters:

  • passReqToCallback (default false) - directs passport to send the request object to the verfication callback
  • useSandbox (default false) - directs the strategy to use evernote's sandbox instead of production

Examples

With request

const strategy = new EvernoteStrategy(
    {
        consumerKey: '<consumerKey>',
        consumerSecret: '<consumerSecret>',
        callbackURL: '<callbackURL>',
        passReqToCallback: true
    },
    async (request, accessToken, refreshToken, profile, done) => {
        
        done(null, <user.id>);
    }
);

With Sandbox

const strategy = new EvernoteStrategy(
    {
        consumerKey: '<consumerKey>',
        consumerSecret: '<consumerSecret>',
        callbackURL: '<callbackURL>',
        passReqToCallback: true,
        useSandbox: true
    },
    async (request, accessToken, refreshToken, profile, done) => {
        
        done(null, <user.id>);
    }
);

Without request

const strategy = new EvernoteStrategy(
    {
        consumerKey: '<consumerKey>',
        consumerSecret: '<consumerSecret>',
        callbackURL: '<callbackURL>',
        passReqToCallback: false //or omit this line
    },
    async (accessToken, refreshToken, profile, done) => {
        
        done(null, <user.id>);
    }
);

Profile Response:

{
    provider: 'evernote',           //provider
    userId: '612225',               //userId
    shard: 's1',                    //shard location of private notes
    expires: '1599323805658'        //unix timestamp of when the auth expires
}

Keywords

FAQs

Package last updated on 09 Dec 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc