Homarr 1.x no longer logging in automatically (OIDC)

Upgraded from old version, using AUTH_OIDC_AUTO_LOGIN: true The intent is when someone visits the board, unauthenticated, authelia intercepts that first and they login (works.) Then homarr loads, and it logs into that automatically too. That used to work. Now the only way I've found to begin the login flow is to click the login button then login. Any ideas? I do have a public board, maybe thats doing it?
Solution:
Hmm interesting, as far as I can tell in previous versions (0.16 and below) it also only logged in automatically on the login page. So it could be related to the public board
Jump to solution
4 Replies
Cakey Bot
Cakey Bot5d ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
vocoder
vocoderOP5d ago
You also can't set a default board to a non-public one, so its not clear how to have this flow-> 1. user hits homarr 1a. user logs into IdP 2. user is forced through login route if unauth Now, they get into homarr unauthenticated, must click their portrait to "Login" then when that is clicked, it automatically goes through the first OIDC provider. tldr; logged out is simply a invalid state in the desired workflow
Solution
Meierschlumpf
Meierschlumpf5d ago
Hmm interesting, as far as I can tell in previous versions (0.16 and below) it also only logged in automatically on the login page. So it could be related to the public board
vocoder
vocoderOP4d ago
I have a .16 version (with my lan stuff) parallel and it still auto-logs me in every time I visit. I can click Log out and the next thing it does is log me back in. No OIDC slug redirect magic in nginx. It just 'worked'. What’s auto-starting the login in the old repo (ajnart/homarr)? In the old codebase there’s a Next.js middleware at src/middleware.ts that protects (most) routes. When you hit any page while unauthenticated, this middleware hands off to NextAuth’s middleware, which by default redirects straight to the sign-in page — that’s why the OIDC flow fires automatically. You can see that middleware in stack traces from issues (note the /src/middleware.ts path), and NextAuth’s docs explain this default redirect behavior. GitHub NextAuth Why the new repo (homarr-labs/homarr) behaves differently In the rewrite, there isn’t a global “force-auth everywhere” middleware by default, so the app renders and you have to click your avatar → Login to start OIDC. However, there is a switch to skip the extra click once you land on the login page: AUTH_OIDC_AUTO_LOGIN=true → “Automatically redirect to OIDC login.” (env var supported in the new docs). Homarr +1 TL;DR Old repo auto-initiates because of src/middleware.ts using NextAuth middleware that redirects to sign-in on any protected route. GitHub NextAuth New repo doesn’t gate routes globally; enable AUTH_OIDC_AUTO_LOGIN=true to auto-jump into your OIDC provider after you press Login. To fully mimic the old “any page triggers login” behavior, you’d need to add a site-wide auth middleware to the new app (not enabled out of the box). Homarr If you want, I can sketch what a minimal NextAuth middleware would look like for the new app to force auth globally. AI slop Removing the public board from assignment seems to have resolved it. Thnx!

Did you find this page helpful?