-
Notifications
You must be signed in to change notification settings - Fork 9
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
error with absence of oauth:twitter key #36
Comments
Hello, I'm not sure I can help you without seeing how you setup the strategy and Express. Do you have |
`
}, (req, accessToken, refreshToken, params, done) => { |
I don't think it makes sense to combine the |
I tried the This is the Strategy setup:
What is breaking the authentication is the passReqToCallback option enabled. I will look into int tomorrow. |
I checked it once again and the problem was in verification callback implementation. The strategy works just fine with the option passReqToCallback enabled. Here is the Strategy setup:
I tested it with the twitter-demo example. The only change to the project is the code above. |
From the error you provided it looks like some problem with express-session set up. @jnv already pointed it out. |
I think I should mention session requirement + possible way how to work around it in the readme, see also #23. Probably add FAQ question to collect these. |
can you say what is a reason for error with absent key oauth:twitter on callback?
debug shows error in if
node_modules/passport-oauth2/lib/state/pkcesession.js
line 67
var key = this._key;
if (!req.session[key]) {
return callback(null, false, { message: 'Unable to verify authorization request state.' });
}
The text was updated successfully, but these errors were encountered: