You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't an issue for the strategy and it may be more of a passport question or a question about the request package, but seeing as you made this strategy, I'm guessing you may have some insight.
After using the strategy, how should I save the access token and secret for future authenticated requests?
const config = require('../config');
passport.use(new discogsStrategy({
consumerKey: config.discogs.key,
consumerSecret: config.discogs.secret,
callbackURL: config.discogs.callback
},
function(token, tokenSecret, profile, done) {
// how should I save token and tokenSecret?
// should they be added to the profile object?
profile.auth.access_token = token;
profile.auth.secret = tokenSecret;
return done(null, profile);
}));
This isn't an issue for the strategy and it may be more of a passport question or a question about the
request
package, but seeing as you made this strategy, I'm guessing you may have some insight.After using the strategy, how should I save the access token and secret for future authenticated requests?
I want to later make a request like this:
I also tried using URL parameters:
https://api.discogs.com/users/${req.user.id}/collection/folders/&oauth_acces_token=${req.user.auth.access_token}&oauth_access_token_secret=${req.user.auth.secret}
I'm getting:
{"message": "The requested resource was not found."}
The
req.user.auth.access_token
andreq.user.auth.secret
are there. Do you see what I'm missing?The text was updated successfully, but these errors were encountered: