Notify President Madagascar

    @giorgosavgeris/passport-zoom-oauth2

    1.1.0 • Public • Published

    A simple Passport strategy for Zoom OAuth2.

    Install

    npm install @giorgosavgeris/passport-zoom-oauth2

    Usage

    Register the strategy

    var ZoomStrategy = require('@giorgosavgeris/passport-zoom-oauth2').Strategy;
    
    passport.use(new ZoomStrategy({
        clientID: ZOOM_CLIENT_ID,
        clientSecret: ZOOM_CLIENT_SECRET,
        callbackURL: 'https://www.example.net/oauth/zoom/callback'
      },
      function(accessToken, refreshToken, profile, done) {
        User.findOrCreate(..., function (err, user) {
          done(err, user);
        });
      }
    ));

    Authenticate requests

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

    License

    This project is licensed under the MIT license. See the LICENSE file for more info.

    Install

    npm i @giorgosavgeris/passport-zoom-oauth2

    DownloadsWeekly Downloads

    346

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    5.58 kB

    Total Files

    6

    Last publish

    Collaborators

    • giorgosavgeris