Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to set URL to retrieve data after authentication/authorization/access steps? #25

Open
poliveira89 opened this issue Sep 3, 2015 · 0 comments

Comments

@poliveira89
Copy link

Trying to follow every single guide or walkthrough on this, I could not found where I set the URL for the "get data/profile" step.

I'm using this module to connect to a OAuth server with version 1.0a (similar to Twitter).

I detected that in the case of the twitter this step is manage internally:
define URL
invoke getProfile request

In this module, there is not property to that, am I right?

How I handle after the authentication/authorization/access steps executed successfully?

passport.use(new OAuth1Strategy({
    requestTokenURL: 'https://www.example.com/oauth/request_token',
    accessTokenURL: 'https://www.example.com/oauth/access_token',
    userAuthorizationURL: 'https://www.example.com/oauth/authorize',
    consumerKey: EXAMPLE_CONSUMER_KEY,
    consumerSecret: EXAMPLE_CONSUMER_SECRET,
    callbackURL: "http://127.0.0.1:3000/auth/example/callback"
  },
  function(token, tokenSecret, profile, done) {
    User.findOrCreate({ exampleId: profile.id }, function (err, user) {
      return done(err, user);
    });
  }
));

Should I do it manually before done(err, user)?
Should I do it manually on the callback endpoint?
Or, there is a third option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant