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

TokenError: The provided value for the 'code' parameter is not valid #18

Open
deefens opened this issue Jan 11, 2017 · 1 comment
Open

Comments

@deefens
Copy link

deefens commented Jan 11, 2017

I've implemented multiple other strategies from jaredhanson (Twitter, Facebook & Google), but can't get the windows live strategy working. After logging into windows live, the callback lasts about 10 seconds before I get back the following error message:

"TokenError:
The provided value for the 'code' parameter is not valid. The code has expired.
at Strategy.OAuth2Strategy.parseErrorResponse"

When I open the auth url from strategy.test.js directly in my browser, I get the same error again:

https://login.live.com/oauth20_authorize.srf?locale=fr-CA&display=popup&response_type=code&redirect_uri=myCallbackURL&client_id=myClientID&scope=wl.signin

My routes are configured like this:

app.get('/auth/windowslive', passport.authenticate('windowslive', { scope: ['wl.signin', 'wl.basic'] })); 
app.get('/auth/windowslive/callback', passport.authenticate('windowslive', { successRedirect: '/', failureRedirect: '/' }));
@jhagege
Copy link

jhagege commented May 1, 2017

+1

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

2 participants