🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

passport-feedly

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-feedly

feedly authentication strategy for Passport.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

passport-feedly

Passport strategy for authenticating with Fedly using the OAuth 2.0 API.

This module lets you authenticate using Feedly in your Node.js applications. By plugging into Passport, Facebook authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Install

$ npm install passport-feedly

Usage

The Feedly authentication strategy authenticates users using a Facebook account and OAuth 2.0 tokens. The strategy requires a verify callback, which accepts these credentials and calls done providing a user, as well as options specifying an app ID, app secret, callback URL.

passport.use(new FacebookStrategy({
    clientID: APP_ID,
    clientSecret: APP_SECRET,
    callbackURL: "http://localhost:8080/auth/feedly/callback",
    enableProof: false
    },
    function(accessToken, refreshToken, profile, done) {
        User.findOrCreate({ id: profile.id }, function (err, user) {
            return done(err, user);
        });
    }
));

Authenticate Requests

Use passport.authenticate(), specifying the 'feedly' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.get('/auth/feedly',
    passport.authenticate('feedly'));

app.get('/auth/feedly/callback',
    passport.authenticate('feedly', { failureRedirect: '/login' }),
    function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
});

Extended Permissions

If you need extended permissions from the user, the permissions can be requested via the scope option to

passport.authenticate()

For example, this authorization requests permission to get user subscriptions

app.get('/auth/feedly',
    passport.authenticate('feedly', { scope : 'https://cloud.feedly.com/subscriptions' }));

Version

0.1.2

License

MIT

Author

Meir Shamay @meir_shamay

Free Software, Hell Yeah!

Keywords

passport

FAQs

Package last updated on 17 Jul 2014

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