OIDC/Authentik configuration issues

I am having issues getting the OIDC integration working with my Authentik setup. Configurations is as follows

Homarr:
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
      AUTH_PROVIDER: credentials,oidc
      AUTH_OIDC_URI: https://auth.mydomain.com/application/o/homarr/.well-known/openid-configuration
      AUTH_OIDC_CLIENT_SECRET: SECRET
      AUTH_OIDC_CLIENT_ID: ID
      AUTH_OIDC_CLIENT_NAME: Authentik
      AUTH_OIDC_AUTO_LOGIN: false
networks: {}


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:

homarr  | [next-auth][error][SIGNIN_OAUTH_ERROR] 
homarr  | https://next-auth.js.org/errors#signin_oauth_error expected 200 OK, got: 404 Not Found {
homarr  |   error: {
homarr  |     message: 'expected 200 OK, got: 404 Not Found',
homarr  |     stack: 'OPError: expected 200 OK, got: 404 Not Found\n' +
homarr  |       '    at processResponse (/app/node_modules/openid-client/lib/helpers/process_response.js:41:11)\n' +
homarr  |       '    at Issuer.discover (/app/node_modules/openid-client/lib/issuer.js:152:20)\n' +
homarr  |       '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
homarr  |       '    at async openidClient (/app/node_modules/next-auth/core/lib/oauth/client.js:16:14)\n' +
homarr  |       '    at async getAuthorizationUrl (/app/node_modules/next-auth/core/lib/oauth/authorization-url.js:70:18)\n' +
homarr  |       '    at async Object.signin (/app/node_modules/next-auth/core/routes/signin.js:38:24)\n' +
homarr  |       '    at async AuthHandler (/app/node_modules/next-auth/core/index.js:260:26)\n' +
homarr  |       '    at async NextAuthApiHandler (/app/node_modules/next-auth/next/index.js:22:19)\n' +
homarr  |       '    at async auth (/app/.next/server/pages/api/auth/[...nextauth].js:143:12)',
homarr  |     name: 'OPError'
homarr  |   },
homarr  |   providerId: 'oidc',
homarr  |   message: 'expected 200 OK, got: 404 Not Found'
homarr  | }


Anyone able to point me in the right direction? I am stumped
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: {}
Was this page helpful?