ImmichI
Immich9mo ago
Knafrag

Oauth authentication against Nextcloud OIDC provider fails with 401

Hi,
I'm trying to authenticate immich against the nextcloud oidc provider. I can authenticate my forgejo installation against it, so the nextcloud part seems to work.
Whenever I try to use oauth, I get this error in immich:
immich_server            | [Nest] 17  - 04/10/2025, 9:31:13 PM   ERROR [Api:ErrorInterceptor~x3s9wk3m] Unknown error: OPError: expected 200 OK, got: 401 Unauthorized
immich_server            | OPError: expected 200 OK, got: 401 Unauthorized
immich_server            |     at processResponse (/usr/src/app/node_modules/openid-client/lib/helpers/process_response.js:41:11)
immich_server            |     at Client.grant (/usr/src/app/node_modules/openid-client/lib/client.js:1381:22)
immich_server            |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
immich_server            |     at async Client.callback (/usr/src/app/node_modules/openid-client/lib/client.js:520:24)
immich_server            |     at async OAuthRepository.getProfile (/usr/src/app/dist/repositories/oauth.repository.js:42:28)
immich_server            |     at async AuthService.link (/usr/src/app/dist/services/auth.service.js:178:34)

In Nextcloud, I get 3 warning messages which I will put in the next post because of maximum message length.

Any ideas what I could try? I made sure the client secret is correct. I deleted immich from nextcloud oidc-provider and added it again multiple times. A screenshot of my config in immich (slightly censored) is attached.
immich.png
Was this page helpful?