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

[BUG] - OAuth Infinite redirects #3399

Closed
5 of 6 tasks
Aurel004 opened this issue Mar 31, 2024 · 3 comments · Fixed by #3406
Closed
5 of 6 tasks

[BUG] - OAuth Infinite redirects #3399

Aurel004 opened this issue Mar 31, 2024 · 3 comments · Fixed by #3406
Labels
bug Something isn't working triage

Comments

@Aurel004
Copy link

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

Hi,

I've seen a "bug" on mealie using OAuth (via Authentik). When OIDC_AUTO_REDIRECT is set to true and the login is invalid, I am redirected back to mealie login page but as OIDC_AUTO_REDIRECT is selected it tries again to connect and again and again.

I've seen that it is a login issue on logs, "username or password incorrect" (I might have a look on why it is incorrect). I think if the login is incorrect, it might disable temporaly auto redirect.

Steps to Reproduce

  1. Enable OIDC with OIDC_SIGNUP_ENABLED set to true
  2. Try to login with an non-existant login in mealie (with OIDC_SIGNUP_ENABLED set to false)

Please provide relevant logs

mealie | ERROR: 31-Mar-24 23:01:13 Incorrect username or password from xx
mealie | ERROR: 31-Mar-24 23:01:14 Incorrect username or password from xx
mealie | INFO: 172.20.0.2:38972 - "POST /api/auth/token HTTP/1.1" 401 Unauthorized
mealie | INFO: 172.20.0.2:38972 - "GET /api/app/about HTTP/1.1" 200 OK
mealie | INFO: 172.20.0.2:38972 - "GET /api/app/about HTTP/1.1" 200 OK
mealie | INFO: 172.20.0.2:38972 - "GET /sw.js HTTP/1.1" 304 Not Modified
mealie | INFO: 127.0.0.1:51656 - "GET /api/app/about HTTP/1.1" 200 OK
mealie | ERROR: 31-Mar-24 23:02:04 Incorrect username or password from xx
mealie | INFO: 172.20.0.2:39216 - "POST /api/auth/token HTTP/1.1" 401 Unauthorized
mealie | INFO: 172.20.0.2:39216 - "GET /api/app/about HTTP/1.1" 200 OK
mealie | INFO: 172.20.0.2:39216 - "GET /api/app/about HTTP/1.1" 200 OK

Mealie Version

nightly

Deployment

Docker (Linux)

Additional Deployment Details

No response

@Aurel004 Aurel004 added bug Something isn't working triage labels Mar 31, 2024
@Aurel004
Copy link
Author

Aurel004 commented Mar 31, 2024

Plus, it seems like it "unadmin"ed me (once logged with correct credidentials). I can't check the server settings as if I was a normal user. How can I get it back ?

Thank you

@cmintey
Copy link
Contributor

cmintey commented Mar 31, 2024

Plus, it seems like it "unadmin"ed me (once logged with correct credidentials). I can't check the server settings as if I was a normal user. How can I get it back ?

Thank you

If you want to be an admin, you'll need to set an environment variable which is explained here

@Aurel004
Copy link
Author

Plus, it seems like it "unadmin"ed me (once logged with correct credidentials). I can't check the server settings as if I was a normal user. How can I get it back ?
Thank you

If you want to be an admin, you'll need to set an environment variable which is explained here

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants