Skip to content

how to use refresh token to get a new access token ? #103

Description

@IWTBCAdeveloper

Hi, there

I use twitter strategy like below

const twitterStrategy = new TwitterStrategy({
  consumerKey: TWITTER_APP_ID,
  consumerSecret: TWITTER_APP_SECRET,
  callbackURL: TWITTER_CALLBACK_URL,
  userProfileURL: 'https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true',
  includeEmail: true,
}, createOrUpdate)

and use passport-oauth2-refresh to refresh token when access token is expires

passport.use (twitterStrategy)
refresh.use (twitterStrategy)

but it throws an error

throw new Error('Cannot register: not an OAuth2 strategy');

what should I do now and what should I do to refresh access token, please help T.T

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions