pt
passport-trello
npm i passport-trello
pt

passport-trello

Trello authentication provider for passport

by Dmitry Gorbunov

1.0.0 (see all)License:MITTypeScript:Not Found
npm i passport-trello
Readme

Trello strategy for passport


Install

$ npm i -S passport-trello

Simple usage:

const { Strategy: TrelloStrategy } = require('passport-trello');

passport.use('trello', new TrelloStrategy(
    {
        consumerKey: TRELLO_ID,
        consumerSecret: TRELLO_SECRET,
        callbackURL: TRELLO_CALLBACK,
        passReqToCallback: true,
        trelloParams: {
            scope: "read,write",
            name: "MyApp",
            expiration: "never",
        },
    }
    (req, token, tokenSecret, profile, done) => {
        if (!req.user) {
            # user is not authenticated, log in via trello or do something else
        } else {
            # authorize user to use Trello api
        }
    }
));
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate