Skip to content

Instantly share code, notes, and snippets.

@anabellaspinelli
Last active September 22, 2018 22:05
Show Gist options
  • Save anabellaspinelli/e6462c7047356c42fbd87b6ef28dfbd4 to your computer and use it in GitHub Desktop.
Save anabellaspinelli/e6462c7047356c42fbd87b6ef28dfbd4 to your computer and use it in GitHub Desktop.
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