Code Monkey home page Code Monkey logo

Comments (7)

YasharF avatar YasharF commented on June 5, 2024

This doesn't seem to be a passport issue. It seems like you are not configuring your oauth callback properly, since you said the code works in your dev environment but not production.

from passport.

t845270g avatar t845270g commented on June 5, 2024

看來不是護照問題。看來您沒有正確配置 oauth 回調,因為您說代碼可以在您的開發環境中運行,但不能在生產環境中運行。

But I only changed the environment variables used locally to the ones used for the online website, without modifying any other code.

Moreover, the Google OAuth API settings are also directed to the corresponding URL.

from passport.

YasharF avatar YasharF commented on June 5, 2024

The docs explain it.

from passport.

t845270g avatar t845270g commented on June 5, 2024

The docs explain it.
Could you please share where in the documentation this is explained? I have been trying to figure out the answer to this issue for almost a month, but still haven't found it. Thank you. : )

from passport.

YasharF avatar YasharF commented on June 5, 2024

https://developers.google.com/identity/protocols/oauth2/web-server

from passport.

t845270g avatar t845270g commented on June 5, 2024

https://developers.google.com/identity/protocols/oauth2/web-server

I have solved the issue. My Passport Google OAuth 2.0 is not the problem. The issue lies in the deployment on CloudFront, where the cache is not accepting the req.query parameters. This caused an error in the redirected route as it couldn't retrieve the code parameter. Still, thank you very much for your help.

https://developers.google.com/identity/protocols/oauth2/web-server

from passport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.