Last active
September 22, 2018 22:05
-
-
Save anabellaspinelli/e6462c7047356c42fbd87b6ef28dfbd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passport.use( | |
new TypeformStrategy( | |
{ | |
// options for the typeform strategy | |
clientID: process.env.CLIENT_ID, | |
clientSecret: process.env.CLIENT_SECRET, | |
callbackURL: process.env.REDIRECT_URI, | |
scope: ['accounts:read', 'forms:write'] | |
}, | |
(accessToken, refreshToken, profile, cb) => { | |
// this is passport's verify callback | |
// it runs after exchanging the code for profile info | |
cb(null, { access_token: accessToken, profile }) | |
} | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment