Git Product home page Git Product logo

Comments (2)

jordanst3wart avatar jordanst3wart commented on June 18, 2024 1

Yeah, the number 2. sample works as expected.

Thanks for your time! Closing

from express-openid-connect.

adamjmcgrath avatar adamjmcgrath commented on June 18, 2024

Hi @jordanst3wart - thanks for raising this

This behaviour is as designed, we don't use the referrer header in the returnTo by default because the referrer header can be a third party (eg if google linked to your login page, you would return to google after login) - if you want this behaviour you can override the default login route behaviour, see https://github.com/auth0/express-openid-connect/blob/master/EXAMPLES.md#3-route-customization

The baseUrl is used as the returnTo value as a default, when it should be the "originalUrl" the request came from.
The error is here. It should use returnTo if defined or originalUrl:

originalUrl in this instance is the /login route - so if you returned to that page after login you would be stuck in an infinite loop

This is a regression of this fix: #95

There is no regression, this behaviour works as designed. When you protect a route with requiresAuth - you will be returned to that route after login (this is the behaviour that was fixed in #95) see https://github.com/auth0/express-openid-connect/blob/master/EXAMPLES.md#2-require-authentication-for-specific-routes

from express-openid-connect.

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.