OIDC 301 HTTP error
Solution:Jump to solution
(also don't forget to set the "AUTH_OIDC_ADMIN_GROUP" env var so the right users get identified as admins directly)
31 Replies
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?
@Tag u told me to setup env
NEXTAUTH_URL
but i'm not sure what to put in, OpenID conf url or just authentication url like https://authentik.example.com?
NEXTAUTH_URL should be your homarr address
oh okay
so something like
https://homarr.domain.tld
redirect to authentik works but it comebacks to homarr login page
not sure what to put into
URIs/Origins redirect field in authentik
https://homarr.domain.tld/api/auth/callback/oidc
so i have it (second link)
I know there are little changes for anthentik, but have you followed https://homarr.dev/docs/advanced/sso#configuration-1 to the best of your ability?
🙋 Single Sign On | Homarr documentation
Homarr supports multiple authentication options, from internal userbase (credentials), to LDAP (with Active directory support), and OIDC.
I'll try to find the thread where authentik users debugged the whole thing
yes i did
https://github.com/ajnart/homarr/issues/1909#issuecomment-1951780147
There's a lot of info in there, not sure what point fixed it for them
i will look into this and say it out here for others
Is there a specifc URL authentik is redirecting you back to? OIDC does everything, even errors, through the URL and it's annoying but oh well
https://panel.exam.com/auth/login?callbackUrl=https%3A%2F%2Fpanel.exam.com%2F&error=OAuthAccountNotLinked
huh
now i see account not linked error
interesting.
adding NEXTAUTH_URL removed 301 error
Yeah, I expected that
Now we just have to fix the OAuthAccountNotLinked issue
from what I can see, you may already have another user in homarr's database using that email address
so i should remove users from db?
I suggest re-enabling credentials, login in with your original admin account, and then check the users in you management page
Yes, but only in homarr's db, as the steps I gave just above
the issue is that i have admin user with that login so i would need to rename admin
That may still be fine?
Otherwise, next step would be to simply delete homarr's user database (this won't remove your boards in this version so no worries there)
admin user is no longer an admin
somewhat homar made him as normal user
so deleting users db is the only option as i see
lol ok, it's fine.
You need to delete the db.sqlite in the /data mount.
restart homarr container, go through onboarding (This time give the admin a unique name) and then set your provider back to OIDC. Should be able to connect without issue then
Solution
(also don't forget to set the "AUTH_OIDC_ADMIN_GROUP" env var so the right users get identified as admins directly)
the weirdest thing is that there is no db file
used find inside docker shell
oh nvm
okay now it works, now i need to setup this user as admin
That's what I said here yeah
sorry missed that
don't manually set it up as admin, it'll get removed automatically. it needs to be recognized throught the group name
works perfectly ❤️ tysm
No problem, have fun