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

Getting Error 400 "invalid_request Missing required parameter: scope" #114

Open
pateldhruv1993 opened this issue Apr 9, 2016 · 5 comments

Comments

@pateldhruv1993
Copy link

So I just started using nodejs and express. I know some basics of express and node but for the most part my current project is just the default project created using the quick project creator for express.

I've tried adding google's passport examples from multiple examples (oAuth2) and they all give me the above mentioned error. I've also read couple of similar issues posted here but I didn't really find them helpful.

From the looks of it the scope is being sent out but after the user presses the "Allow" button on googles auth page the redirect after that does not get that scope for some reason.

The code of app.js : http://pastebin.com/MzHsLx4b

@toblerpwn
Copy link

toblerpwn commented Sep 1, 2016

I'm having the same issue; Express 4.14.0, Node.js 0.10.31.

Also Express 4.14.0 and Node.js 0.12.15.

@brannonh
Copy link

I am also having this issue. I am using restify 4.3.0 on node 7.7.2. Behavior is exactly the same as @pateldhruv1993 describes.

If anyone has found a fix, I'd appreciate them sharing it.

@AndrejGajdos
Copy link

+1

@brannonh
Copy link

brannonh commented Jan 8, 2018

Forgot to come back here. I was able to fix this by adding the following code after initializing the server:

api.use(restify.plugins.queryParser({ mapParams: false }));

Once I added that line, I no longer saw the Google error, and the process passed back to my code.

@dharmareddy089
Copy link

one of my friend suggest me this piece of code
passport.authenticate('google', {scope: 'https://www.googleapis.com/auth/plus.login'});
but it not worked for me .may be will be usefull to you

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

5 participants