passport-google-oauth

Invalid parameter value for redirect_uri: Missing scheme: /auth/google_auth_code/callback

拈花ヽ惹草 提交于 2021-02-07 03:13:35
问题 edit : here is a minimal viable project I am trying to get an access and refresh token from Google from an authorization code for the server-side flow. I followed Google's guide here: https://developers.google.com/identity/sign-in/web/server-side-flow. I am using using passport and passport-google-authcode. Here are the routes for the node app: router.get('/auth/google_auth_code', passport.authenticate('google_authcode', { scope: [ 'https://www.googleapis.com/auth/calendar', 'profile', 'https

Invalid parameter value for redirect_uri: Missing scheme: /auth/google_auth_code/callback

≡放荡痞女 提交于 2021-02-07 03:03:55
问题 edit : here is a minimal viable project I am trying to get an access and refresh token from Google from an authorization code for the server-side flow. I followed Google's guide here: https://developers.google.com/identity/sign-in/web/server-side-flow. I am using using passport and passport-google-authcode. Here are the routes for the node app: router.get('/auth/google_auth_code', passport.authenticate('google_authcode', { scope: [ 'https://www.googleapis.com/auth/calendar', 'profile', 'https

Passport-Google-OAuth Callback Not working when used in Web Service

时光怂恿深爱的人放手 提交于 2020-02-07 05:43:04
问题 I Have used Passport-Google-OAuth in Node.js web service project. I am using OAuth2Strategy. The process i have used is i call the web service method to authenticate user from his Gmail account. Initially i serve the Raw HTMl which i receive from calling the Passport-google-OAuth. Which works fine. Then i login with valid Gmail accounts. Once the Callback Url is called by google the server goes into infinite loop and calls the callback url again and again after fixed interval of time. My

Local and Google strategy in passport.js: issue when serializing user

巧了我就是萌 提交于 2020-01-03 02:47:13
问题 I've been trying to understand why I couldn't keep an user logged in once authenticated even though authentication itself was working. I even posted a question here: Passport.js - Local strategy doesn't authenticate By trying to fix the issue, I finally worked out what's wrong. The issue is the following: I have two different passport strategy, so I am serializing and deserializing the user twice. If I serialize the user with the local strategy first, local strategy will work, but Google's

invalid_request with missing: scope using Google Passportjs on Google Oauth2

跟風遠走 提交于 2019-12-12 03:20:01
问题 An issues has developed in authentication code that was working perfectly up until the beginning of the year, and then seemingly broke with little change on my part, I've tried to regress to a previous version and find the cause with no luck. So I'm Looking for help in fixing the code as it exists today. I'm using nodejs v0.10.25 Passportjs to provide authentication through both Google and Facebook. My packages: "config-multipaas": "^0.1.0", "restify": "^2.8.3", "googleapis": "~2.1.5", "mocha

Local and Google strategy in passport.js: issue when serializing user

你说的曾经没有我的故事 提交于 2019-12-07 03:30:32
I've been trying to understand why I couldn't keep an user logged in once authenticated even though authentication itself was working. I even posted a question here: Passport.js - Local strategy doesn't authenticate By trying to fix the issue, I finally worked out what's wrong. The issue is the following: I have two different passport strategy, so I am serializing and deserializing the user twice. If I serialize the user with the local strategy first, local strategy will work, but Google's won't. And vice versa. I put a comment to highlight the problem in app.js. Here's the files: app.js const