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

ReferenceError: User is not defined #67

Open
SAMRITIS opened this issue Jun 27, 2020 · 2 comments
Open

ReferenceError: User is not defined #67

SAMRITIS opened this issue Jun 27, 2020 · 2 comments

Comments

@SAMRITIS
Copy link

SAMRITIS commented Jun 27, 2020

ReferenceError: User is not defined
at Strategy._verify (C:\Users\root\Desktop\app\server.js:25:5)
at C:\Users\root\Desktop\app\node_modules\passport-oauth2\lib\strategy.js:202:24
at C:\Users\root\Desktop\app\node_modules\passport-google-oauth20\lib\strategy.js:122:5
at passBackControl (C:\Users\root\Desktop\app\node_modules\oauth\lib\oauth2.js:134:9)
at IncomingMessage. (C:\Users\root\Desktop\app\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

@DariusPirvulescu
Copy link

DariusPirvulescu commented Jul 13, 2020

Hi,

Did you add the option userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo" when you describe GoogleStrategy?

passport.use(new GoogleStrategy({
[...]
userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo"
}

@toritsejuFO
Copy link

Hello,

The userProfileURL option is not really necessary though, passport has a default url if you do not pass one, which is exactly the same one you're suggesting in version 2.0.0. @DariusPirvulescu

@SAMRITIS care to share your server.js file? For more context at least...maybe in an around that line 25.

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

3 participants