Giter Site home page Giter Site logo

Comments (8)

james-d-elliott avatar james-d-elliott commented on May 25, 2024

Are you using an official nginx config? This looks like a configuration issue with your proxy. I'd also suggest submitting a HAR file as this can't be replicated and this interaction is tested in integration testing.

from authelia.

distributev avatar distributev commented on May 25, 2024

In what sense configuration issue with the nginx proxy? nginx doesn't know about authelia URLs, authelia knows so why the nginx proxy configuration would ever redirect to an authelia specific URL like api/auth/error and then, once this part of the URL is manually removed from the browser address bar, the actual application is loaded?

It might be an authelia related (mis)configuration and the authelia configuration is already attached to the case - in addition, even if it is clear that authelia did actually successfully authenticated the user (because, if I manually remove the api/auth/error from the address bar the correct app is loaded) instead of forwarding me to the app it just shows the error screen with the api/auth/error URL. Why would it do that?

I understand this is tested but authelia has so many proxy combinations which supports that testing against each and every proxy with each and every configuration combination (valid) is virtually impossible - Its powerful to support so many proxies but it is also more difficult to be sure what works when. For instance maybe people use Authelia mostly with NGINX proxy manager and I just configure authelia with plain nginx and this combination (maybe) is not so much tested like nginx proxy manager.

from authelia.

distributev avatar distributev commented on May 25, 2024

If it helps I did use the official authelia documentation for nginx integration and I also looked how swag linuxserver/reverse-proxy-confs is integrating authelia with nginx.

https://github.com/linuxserver/reverse-proxy-confs

from authelia.

distributev avatar distributev commented on May 25, 2024

I just noticed that, after an expired session, it shows me to login and the URL starts by being
/?rd=https%3A%2F%2Fsubdomain2.subdomain.domain.org%2Fapi%2Fauth%2Ferror

Notice the %2Fapi%2Fauth%2Ferror and the end of the URL => it is redirecting to %2Fapi%2Fauth%2Ferror

this is not what is expected - what is expected is, even after expired session, to provide good credentials and to login to the app and not to see an error screen with an %2Fapi%2Fauth%2Ferror URL after correct credentials are provided

from authelia.

james-d-elliott avatar james-d-elliott commented on May 25, 2024

In what sense configuration issue with the nginx proxy? nginx doesn't know about authelia URLs, authelia knows so why the nginx proxy configuration would ever redirect to an authelia specific URL like api/auth/error and then, once this part of the URL is manually removed from the browser address bar, the actual application is loaded?

None of those URLs you're having issues with are Authelia's URLs. /api/auth/error and /api/auth/_log are not paths we use.

Notice the %2Fapi%2Fauth%2Ferror and the end of the URL => it is redirecting to %2Fapi%2Fauth%2Ferror

I understand what's happening, but it's not Authelia making this redirection or is very unlikely to be. The HAR or network tab of your browser will reveal the correct redirection to the FULL URL in that's in the RD parameter https://subdomain2.subdomain.domain.org/api/auth/error, then when you've been redirected to https://subdomain2.subdomain.domain.org/api/auth/error the application itself or the proxy are redirecting you to /api/auth/error.

from authelia.

james-d-elliott avatar james-d-elliott commented on May 25, 2024

Any updates?

from authelia.

distributev avatar distributev commented on May 25, 2024

Yes, you were right /api/auth/error comes from next-auth which is used by the protected app and most likely next-auth session expired and, together witu authelia being expired, it shows the /?rd=https%3A%2F%2Fsubdomain2.subdomain.domain.org%2Fapi%2Fauth%2Ferror

I increased the next-auth session maxAge to see if it will make any difference.

from authelia.

james-d-elliott avatar james-d-elliott commented on May 25, 2024

Alright, awesome. I'll close this off. You're welcome to open another bug report, reopen this one with a reply, or open a discussion regarding next auth if you can't figure it out.

from authelia.

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.