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] - Authentik not logging in correctly #3488
Comments
Are there any errors in the browser console or network tab? I wonder if the forward auth is causing you issues. I think something similar caused someone else issues with Authelia. When you have OAuth set up, you don't really need forward auth. Can you try removing that from your Caddy config and try? |
With ForwardAuth disabled I still have the same issue. https://mealie.stalepopcorn.me/null? with a fresh browser cache, mealie container etc, When I visit the site URL, I am presented with all my recipes (It doesn't even ask me to login with OAuth, even in incognito mode), and the login button is visible which takes you to the login page. Either the normal login page appears, but Login with OAuth throws an error, or I get a 404 page and the URL in the address bar starts with
In the browser console I can see
I have added
to my Caddyfile but it still seems to throw that error |
So you're being blocked by Authentik's CORS policy. What browser is this happening in? Does it happen in other browsers? |
Firefox, Edge and Chrome |
I don't use Authentik, so I'm not sure if it's just a configuration you're missing there. Maybe the guides and comments in #3334 can help |
Following, as I have exactly the same issue with mealie and authentik |
I have fixed the login issues with the latest nightly, but Recipe Create, or Import does not work on Mobile. Clicking the Create and choosing either option just reloads the main recipes page. The only thing out of the ordinary I can see in the logs is
|
First Check
What is the issue you are experiencing?
I have Mealie setup to use OAuth via Authentik. When I access the site via mealie.my.domain, I am presented with my Authentik login page, I log in, and mealie loads up showing all my recipes, but I am not completely logged in somehow. There is still a Login button at the top right corner, and the Mealie menu is blank.
If you click Login, it takes you to the Mealie login page, but clicking Login with OAuth either says there is a problem, or you are presented with a Mealie 404 page. Login in via regular Username\Password is not possible as Mealie is set to use OAuth.
What is strange is if I access the site from my local LAN, or via Wireguard, my domain DNS is rewritten to my server LAN IP instead of my Public WAN IP, and Caddy is setup to bypass Authentik if accessing from a LAN IP, and in this case, OAuth is disabled, and I can login via username and password.
I have completely rebuilt the mealie container, and tried incognito mode and 3 different browsers and the result is the same.
Steps to Reproduce
Please provide relevant logs
This is the log from a restart\login sequence. LOG_LEVEL=debug
I have also noticed
/null?protocol=oauth2&response_type=code&access_type&client_id=XXXXXXXXXXXXXXXXXXXXX&redirect_uri=https%3A%2F%2Fmealie.my.domain%2Flogin&scope=openid%20profile%20email%20groups&state=UgTDTVHHai&code_challenge_method=S256&code_challenge=KPcEbyCTieF5gw5AIrX66nNxGJ55mU-9frZOxTRI4uE HTTP/1.1"
in the log from a previous attempt, and the browser actually trues to download a file called "null"
There are no errors in Authentik or Caddy logs at all.
Mealie Version
Docker image v1.5.1
Deployment
Docker (Linux)
Additional Deployment Details
Standard Caddy deployment
The text was updated successfully, but these errors were encountered: