Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Immich OICD Auth issue #287

@sepidre

Description

@sepidre

Hi there

I want to secure my immich but get this issuer below.

Describe the bug:

I want to auhenticate Immich with voidauth but I get allways this error in Immich:

2026-01-25T14:14:54.993769508Z [Nest] 22 - 01/25/2026, 3:14:54 PM ERROR [Api:OAuthRepositorysz83z3zc] OAuth login failed: fetch failed
2026-01-25T14:14:54.993962604Z [Nest] 22 - 01/25/2026, 3:14:54 PM ERROR [Api:OAuthRepository
sz83z3zc] TypeError: fetch failed
2026-01-25T14:14:54.993979336Z at node:internal/deps/undici/undici:13510:13
2026-01-25T14:14:54.993983293Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2026-01-25T14:14:54.993985958Z at async tokenEndpointRequest (file:///usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/oauth4webapi/build/index.js:1169:22)
2026-01-25T14:14:54.993989015Z at async authorizationCodeGrant (file:///usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/openid-client/build/index.js:958:22)
2026-01-25T14:14:54.993991780Z at async OAuthRepository.getProfile (/usr/src/app/server/dist/repositories/oauth.repository.js:56:28)
2026-01-25T14:14:54.993994215Z at async AuthService.callback (/usr/src/app/server/dist/services/auth.service.js:188:25)
2026-01-25T14:14:54.993996609Z at async OAuthController.finishOAuth (/usr/src/app/server/dist/controllers/oauth.controller.js:47:22) {
2026-01-25T14:14:54.993999064Z [cause]: ConnectTimeoutError: Connect Timeout Error (attempted address: voidauth.myDomain.com:80, timeout: 10000ms)
2026-01-25T14:14:54.994001418Z at onConnectTimeout (node:internal/deps/undici/undici:2602:28)
2026-01-25T14:14:54.994003752Z at Immediate._onImmediate (node:internal/deps/undici/undici:2583:11)
2026-01-25T14:14:54.994006197Z at process.processImmediate (node:internal/timers:485:21)
2026-01-25T14:14:54.994008481Z at process.callbackTrampoline (node:internal/async_hooks:130:17) {
2026-01-25T14:14:54.994020825Z code: 'UND_ERR_CONNECT_TIMEOUT'
2026-01-25T14:14:54.994022928Z }
2026-01-25T14:14:54.994024882Z }
2026-01-25T14:14:54.994100004Z [Nest] 22 - 01/25/2026, 3:14:54 PM ERROR [Api:ErrorInterceptor~sz83z3zc] Unknown error: Error: OAuth login failed
2026-01-25T14:14:54.994106717Z Error: OAuth login failed
2026-01-25T14:14:54.994109352Z at OAuthRepository.getProfile (/usr/src/app/server/dist/repositories/oauth.repository.js:72:19)
2026-01-25T14:14:54.994111807Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2026-01-25T14:14:54.994113820Z at async AuthService.callback (/usr/src/app/server/dist/services/auth.service.js:188:25)
2026-01-25T14:14:54.994116125Z at async OAuthController.finishOAuth (/usr/src/app/server/dist/controllers/oauth.controller.js:47:22)

I have Portainer successfully configured with oauth and immich/portainer and voidauth are within the same reverseproxy and docker swarm environment.

I tried also the Auth Methods post/basic and none.

The Immich traedfik swarm compose label are

traefik.enable: 1
traefik.swarm.network: cloud-public
## HTTP Routers
traefik.http.routers.immich.entrypoints: web
traefik.http.routers.immich.rule: Host(`immich.mydomain.com`)
## Middlewares
traefik.http.routers.immich.middlewares: voidauth-middle@swarm
## HTTP Services
traefik.http.routers.immich.service: immich
traefik.http.services.immich.loadbalancer.server.port: 2283

The portainer traedfik swarm compose label are

traefik.enable: 1
traefik.swarm.network: cloud-public
# define traefik dashboard router and service
traefik.http.routers.portainer.rule: Host(`portainer.mydomain.com`)
traefik.http.routers.portainer.service: portainer-svc
traefik.http.routers.portainer.entrypoints: web
traefik.http.routers.portainer.middlewares: chain-no-auth@file
traefik.http.services.portainer-svc.loadbalancer.server.port: 9000
traefik.http.services.portainer-svc.loadbalancer.passhostheader: 1

The main difference is the middleware?

Screenshots:

Voidauth Config

Image

Immich Confg

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions