OIDC/Authentik configuration issues
I am having issues getting the OIDC integration working with my Authentik setup. Configurations is as follows
Homarr:
Authentik:
Redirect URI: https://home.mydomain.com/api/auth/callback/oidc
(Everything else default)
When I try to use the OAUTH Login i get redirected to:
http://localhost:7575/api/auth/error?error=OAuthSignin
Which seems odd?
Logs are as follows:
Anyone able to point me in the right direction? I am stumped
Solution:Jump to solution
See my edits to your config below:
`services:
homarr:
container_name: homarr...
9 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?
Set NEXTAUTH_URL env var to your homarr address
Good news, it no longer redirects to localhost.
Bad news, it still doesn't work and I get this error:
One of the urls are wrong. Check on other threads about Authentik to see what others might have done
(the search function of discord should be good enough here)
Solution
See my edits to your config below:
services:
homarr:
container_name: homarr
image: ghcr.io/ajnart/homarr:latest
restart: unless-stopped
volumes:
- /media/homarr/configs:/app/data/configs
- /media/homarr/icons:/app/public/icons
- /media/homarr/data:/data
ports:
- 7575:7575
environment:
BASE_URL: home.mydomain.com
NEXTAUTH_URL: home.mydomain.com
NEXTAUTH_SECRET: RANDOM488383!!@
AUTH_PROVIDER: credentials,oidc
AUTH_OIDC_URI: https://home.mydomain.com/application/o/homarr
AUTH_OIDC_CLIENT_SECRET: SECRET
AUTH_OIDC_CLIENT_ID: ID
AUTH_OIDC_CLIENT_NAME: Authentik
AUTH_OIDC_ADMIN_GROUP: authentik Admins
AUTH_OIDC_OWNER_GROUP: authentik Admins
networks: {}
Make sure your REdirect URI in your Authentik provider is your.homarr.domain.com/api/auth/callback/oidc
Also make sure the user you're using is added to the groups you define for users/admins
Here's my Authentik config:
That works, thanks!
You're very welcome