Immich can't authenticate with authentik #7893

Closed
opened 2026-02-05 13:23:46 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @lukee12zakk on GitHub (Nov 21, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

when I try to sign in to immich with my authentik setup, it doesn't work. It works with proxmox, but somehow, immich isn't working. I'm running immich on a proxmox lxc made by the pve scripts people, And authentik is on a casaos lxc. I also have npm plus set up to use my ddns, and that works fine.

The OS that Immich Server is running on

Debian lxc

Version of Immich Server

2.3.1

Version of Immich Mobile App

nan

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

Not sure how to add this

Your .env content

Same with this, not sure how to add it

Reproduction steps

  1. Set up immich oauth the exact way that the authentik and immich guide states
  2. Attempt to sign in
  3. Get the error
    ...

Relevant log output

[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RoutesResolver] ViewController {/api/view}:
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RoutesResolver] WorkflowController {/api/workflows}:
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows, POST} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows, GET} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, GET} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, PUT} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, DELETE} route
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:NestApplication] Nest application successfully started
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v2.3.1] [production] 
[Nest] 383  - 11/21/2025, 10:40:06 AM     LOG [Api:MachineLearningRepository] Machine learning server became healthy (http://127.0.0.1:3003).
[Nest] 383  - 11/21/2025, 10:40:12 AM     LOG [Api:WebsocketRepository] Websocket Connect:    cEzqm1c0AvFD5OxaAAAB
[Nest] 383  - 11/21/2025, 10:40:31 AM   ERROR [Api:OAuthRepository~gupqpgkl] OAuth login failed: server responded with an error in the response body
[Nest] 383  - 11/21/2025, 10:40:31 AM   ERROR [Api:OAuthRepository~gupqpgkl] ResponseBodyError: server responded with an error in the response body
    at checkOAuthBodyError (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:924:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1202:5)
    at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
    at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  cause: {
    error: 'invalid_grant',
    error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client',
    request_id: 'dae3ff0c9e2646ceac83b64c31cf4b1e'
  },
  code: 'OAUTH_RESPONSE_BODY_ERROR',
  error: 'invalid_grant',
  status: 400,
  error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client'
}
[Nest] 383  - 11/21/2025, 10:40:31 AM   ERROR [Api:ErrorInterceptor~gupqpgkl] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)
[Nest] 383  - 11/21/2025, 10:40:35 AM   ERROR [Api:OAuthRepository~s76z7kaz] OAuth login failed: invalid response encountered
[Nest] 383  - 11/21/2025, 10:40:35 AM   ERROR [Api:OAuthRepository~s76z7kaz] ClientError: invalid response encountered
    at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12)
    at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23)
    at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  code: 'OAUTH_INVALID_RESPONSE',
  [cause]: OperationProcessingError: unexpected JWT "alg" header parameter
      at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12)
      at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19)
      at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5)
      at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
      at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
      at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
      at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
      at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
    code: 'OAUTH_INVALID_RESPONSE',
    [cause]: {
      header: {
        alg: 'ES384',
        kid: '5b761725acd1094b3c6028dc318a3f85',
        typ: 'JWT'
      },
      expected: 'RS256',
      reason: 'client configuration'
    }
  }
}
[Nest] 383  - 11/21/2025, 10:40:35 AM   ERROR [Api:ErrorInterceptor~s76z7kaz] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)
[Nest] 383  - 11/21/2025, 10:42:06 AM   ERROR [Api:OAuthRepository~b7oixlw8] OAuth login failed: server responded with an error in the response body
[Nest] 383  - 11/21/2025, 10:42:06 AM   ERROR [Api:OAuthRepository~b7oixlw8] ResponseBodyError: server responded with an error in the response body
    at checkOAuthBodyError (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:924:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1202:5)
    at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
    at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  cause: {
    error: 'invalid_grant',
    error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client',
    request_id: '7bd35b8db2ae4e46b606c7f21f873a5b'
  },
  code: 'OAUTH_RESPONSE_BODY_ERROR',
  error: 'invalid_grant',
  status: 400,
  error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client'
}
[Nest] 383  - 11/21/2025, 10:42:06 AM   ERROR [Api:ErrorInterceptor~b7oixlw8] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)
[Nest] 383  - 11/21/2025, 10:42:09 AM   ERROR [Api:OAuthRepository~2ee6gtut] OAuth login failed: invalid response encountered
[Nest] 383  - 11/21/2025, 10:42:09 AM   ERROR [Api:OAuthRepository~2ee6gtut] ClientError: invalid response encountered
    at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12)
    at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23)
    at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  code: 'OAUTH_INVALID_RESPONSE',
  [cause]: OperationProcessingError: unexpected JWT "alg" header parameter
      at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12)
      at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19)
      at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5)
      at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
      at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
      at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
      at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
      at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
    code: 'OAUTH_INVALID_RESPONSE',
    [cause]: {
      header: {
        alg: 'ES384',
        kid: '5b761725acd1094b3c6028dc318a3f85',
        typ: 'JWT'
      },
      expected: 'RS256',
      reason: 'client configuration'
    }
  }
}
[Nest] 383  - 11/21/2025, 10:42:09 AM   ERROR [Api:ErrorInterceptor~2ee6gtut] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)
[Nest] 383  - 11/21/2025, 10:42:14 AM     LOG [Api:SystemConfigService~1qhfkjsb] LogLevel=log (set via system config)
[Nest] 96  - 11/21/2025, 10:42:14 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)
[Nest] 383  - 11/21/2025, 10:42:44 AM     LOG [Api:SystemConfigService~5hw8y5qn] LogLevel=log (set via system config)
[Nest] 96  - 11/21/2025, 10:42:44 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)
[Nest] 383  - 11/21/2025, 10:43:27 AM     LOG [Api:WebsocketRepository] Websocket Disconnect: cEzqm1c0AvFD5OxaAAAB
[Nest] 383  - 11/21/2025, 11:01:57 AM     LOG [Api:WebsocketRepository] Websocket Connect:    PLKWrmo8ueUCJFYOAAAD
[Nest] 383  - 11/21/2025, 11:05:13 AM     LOG [Api:WebsocketRepository] Websocket Disconnect: PLKWrmo8ueUCJFYOAAAD
[Nest] 383  - 11/21/2025, 11:07:57 AM     LOG [Api:WebsocketRepository] Websocket Connect:    nfmzZOpE7S8eWBmKAAAF
[Nest] 383  - 11/21/2025, 11:15:23 AM     LOG [Api:WebsocketRepository] Websocket Disconnect: nfmzZOpE7S8eWBmKAAAF
[Nest] 383  - 11/21/2025, 11:24:03 AM   ERROR [Api:OAuthRepository~lfykheqc] OAuth login failed: invalid response encountered
[Nest] 383  - 11/21/2025, 11:24:03 AM   ERROR [Api:OAuthRepository~lfykheqc] ClientError: invalid response encountered
    at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12)
    at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23)
    at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  code: 'OAUTH_INVALID_RESPONSE',
  [cause]: OperationProcessingError: unexpected JWT "alg" header parameter
      at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12)
      at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19)
      at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5)
      at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
      at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
      at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
      at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
      at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
    code: 'OAUTH_INVALID_RESPONSE',
    [cause]: {
      header: {
        alg: 'ES384',
        kid: '5b761725acd1094b3c6028dc318a3f85',
        typ: 'JWT'
      },
      expected: 'RS256',
      reason: 'client configuration'
    }
  }
}
[Nest] 383  - 11/21/2025, 11:24:03 AM   ERROR [Api:ErrorInterceptor~lfykheqc] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)
[Nest] 383  - 11/21/2025, 11:26:26 AM    WARN [Api:ServerInfoRepository~boi5qqwi] Failed to read /opt/immich/app/build-lock.json
[Nest] 383  - 11/21/2025, 11:26:28 AM     LOG [Api:WebsocketRepository] Websocket Connect:    5w-mIum5ri-IcWd4AAAH
[Nest] 383  - 11/21/2025, 11:31:43 AM     LOG [Api:SystemConfigService~soledina] LogLevel=log (set via system config)
[Nest] 96  - 11/21/2025, 11:31:43 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)
[Nest] 383  - 11/21/2025, 11:31:53 AM     LOG [Api:WebsocketRepository] Websocket Connect:    0URyRi0d8atoHkicAAAJ
[Nest] 383  - 11/21/2025, 11:32:07 AM     LOG [Api:WebsocketRepository] Websocket Disconnect: 0URyRi0d8atoHkicAAAJ
[Nest] 383  - 11/21/2025, 11:32:20 AM   ERROR [Api:OAuthRepository~i41p6rul] Error in OAuth discovery: TypeError: fetch failed
[Nest] 383  - 11/21/2025, 11:32:20 AM   ERROR [Api:OAuthRepository~i41p6rul] TypeError: fetch failed
    at node:internal/deps/undici/undici:15845:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async performDiscovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:266:16)
    at async discovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:243:16)
    at async OAuthRepository.getClient (/opt/immich/app/dist/repositories/oauth.repository.js:88:20)
    at async OAuthRepository.authorize (/opt/immich/app/dist/repositories/oauth.repository.js:25:24)
    at async AuthService.authorize (/opt/immich/app/dist/services/auth.service.js:175:16)
    at async OAuthController.startOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:37:46)
[Nest] 383  - 11/21/2025, 11:32:24 AM   ERROR [Api:OAuthRepository~fvk2y83d] Error in OAuth discovery: TypeError: fetch failed
[Nest] 383  - 11/21/2025, 11:32:24 AM   ERROR [Api:OAuthRepository~fvk2y83d] TypeError: fetch failed
    at node:internal/deps/undici/undici:15845:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async performDiscovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:266:16)
    at async discovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:243:16)
    at async OAuthRepository.getClient (/opt/immich/app/dist/repositories/oauth.repository.js:88:20)
    at async OAuthRepository.authorize (/opt/immich/app/dist/repositories/oauth.repository.js:25:24)
    at async AuthService.authorize (/opt/immich/app/dist/services/auth.service.js:175:16)
    at async OAuthController.startOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:37:46)
[Nest] 383  - 11/21/2025, 11:33:04 AM     LOG [Api:SystemConfigService~q1dsrtwh] LogLevel=log (set via system config)
[Nest] 96  - 11/21/2025, 11:33:04 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)
[Nest] 383  - 11/21/2025, 11:33:12 AM   ERROR [Api:OAuthRepository~o551yd1i] OAuth login failed: invalid response encountered
[Nest] 383  - 11/21/2025, 11:33:12 AM   ERROR [Api:OAuthRepository~o551yd1i] ClientError: invalid response encountered
    at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12)
    at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23)
    at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
  code: 'OAUTH_INVALID_RESPONSE',
  [cause]: OperationProcessingError: unexpected JWT "alg" header parameter
      at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12)
      at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19)
      at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5)
      at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20)
      at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18)
      at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28)
      at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
      at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) {
    code: 'OAUTH_INVALID_RESPONSE',
    [cause]: {
      header: {
        alg: 'ES384',
        kid: '5b761725acd1094b3c6028dc318a3f85',
        typ: 'JWT'
      },
      expected: 'RS256',
      reason: 'client configuration'
    }
  }
}
[Nest] 383  - 11/21/2025, 11:33:12 AM   ERROR [Api:ErrorInterceptor~o551yd1i] Unknown error: Error: OAuth login failed
Error: OAuth login failed
    at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25)
    at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22)

Additional information

No response

Originally created by @lukee12zakk on GitHub (Nov 21, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug when I try to sign in to immich with my authentik setup, it doesn't work. It works with proxmox, but somehow, immich isn't working. I'm running immich on a proxmox lxc made by the pve scripts people, And authentik is on a casaos lxc. I also have npm plus set up to use my ddns, and that works fine. ### The OS that Immich Server is running on Debian lxc ### Version of Immich Server 2.3.1 ### Version of Immich Mobile App nan ### Platform with the issue - [x] Server - [x] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML Not sure how to add this ``` ### Your .env content ```Shell Same with this, not sure how to add it ``` ### Reproduction steps 1. Set up immich oauth the exact way that the authentik and immich guide states 2. Attempt to sign in 3. Get the error ... ### Relevant log output ```shell [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RoutesResolver] ViewController {/api/view}: [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RoutesResolver] WorkflowController {/api/workflows}: [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/workflows, POST} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/workflows, GET} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, GET} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, PUT} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, DELETE} route [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:NestApplication] Nest application successfully started [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v2.3.1] [production]  [Nest] 383 - 11/21/2025, 10:40:06 AM  LOG [Api:MachineLearningRepository] Machine learning server became healthy (http://127.0.0.1:3003). [Nest] 383 - 11/21/2025, 10:40:12 AM  LOG [Api:WebsocketRepository] Websocket Connect: cEzqm1c0AvFD5OxaAAAB [Nest] 383 - 11/21/2025, 10:40:31 AM  ERROR [Api:OAuthRepository~gupqpgkl] OAuth login failed: server responded with an error in the response body [Nest] 383 - 11/21/2025, 10:40:31 AM  ERROR [Api:OAuthRepository~gupqpgkl] ResponseBodyError: server responded with an error in the response body at checkOAuthBodyError (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:924:19)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1202:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { cause: { error: 'invalid_grant', error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client', request_id: 'dae3ff0c9e2646ceac83b64c31cf4b1e' }, code: 'OAUTH_RESPONSE_BODY_ERROR', error: 'invalid_grant', status: 400, error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client' } [Nest] 383 - 11/21/2025, 10:40:31 AM  ERROR [Api:ErrorInterceptor~gupqpgkl] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) [Nest] 383 - 11/21/2025, 10:40:35 AM  ERROR [Api:OAuthRepository~s76z7kaz] OAuth login failed: invalid response encountered [Nest] 383 - 11/21/2025, 10:40:35 AM  ERROR [Api:OAuthRepository~s76z7kaz] ClientError: invalid response encountered at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12) at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23) at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: OperationProcessingError: unexpected JWT "alg" header parameter at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12) at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19) at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5) at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: { header: { alg: 'ES384', kid: '5b761725acd1094b3c6028dc318a3f85', typ: 'JWT' }, expected: 'RS256', reason: 'client configuration' } } } [Nest] 383 - 11/21/2025, 10:40:35 AM  ERROR [Api:ErrorInterceptor~s76z7kaz] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) [Nest] 383 - 11/21/2025, 10:42:06 AM  ERROR [Api:OAuthRepository~b7oixlw8] OAuth login failed: server responded with an error in the response body [Nest] 383 - 11/21/2025, 10:42:06 AM  ERROR [Api:OAuthRepository~b7oixlw8] ResponseBodyError: server responded with an error in the response body at checkOAuthBodyError (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:924:19)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1202:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { cause: { error: 'invalid_grant', error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client', request_id: '7bd35b8db2ae4e46b606c7f21f873a5b' }, code: 'OAUTH_RESPONSE_BODY_ERROR', error: 'invalid_grant', status: 400, error_description: 'The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client' } [Nest] 383 - 11/21/2025, 10:42:06 AM  ERROR [Api:ErrorInterceptor~b7oixlw8] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) [Nest] 383 - 11/21/2025, 10:42:09 AM  ERROR [Api:OAuthRepository~2ee6gtut] OAuth login failed: invalid response encountered [Nest] 383 - 11/21/2025, 10:42:09 AM  ERROR [Api:OAuthRepository~2ee6gtut] ClientError: invalid response encountered at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12) at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23) at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: OperationProcessingError: unexpected JWT "alg" header parameter at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12) at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19) at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5) at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: { header: { alg: 'ES384', kid: '5b761725acd1094b3c6028dc318a3f85', typ: 'JWT' }, expected: 'RS256', reason: 'client configuration' } } } [Nest] 383 - 11/21/2025, 10:42:09 AM  ERROR [Api:ErrorInterceptor~2ee6gtut] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) [Nest] 383 - 11/21/2025, 10:42:14 AM  LOG [Api:SystemConfigService~1qhfkjsb] LogLevel=log (set via system config) [Nest] 96 - 11/21/2025, 10:42:14 AM  LOG [Microservices:SystemConfigService] LogLevel=log (set via system config) [Nest] 383 - 11/21/2025, 10:42:44 AM  LOG [Api:SystemConfigService~5hw8y5qn] LogLevel=log (set via system config) [Nest] 96 - 11/21/2025, 10:42:44 AM  LOG [Microservices:SystemConfigService] LogLevel=log (set via system config) [Nest] 383 - 11/21/2025, 10:43:27 AM  LOG [Api:WebsocketRepository] Websocket Disconnect: cEzqm1c0AvFD5OxaAAAB [Nest] 383 - 11/21/2025, 11:01:57 AM  LOG [Api:WebsocketRepository] Websocket Connect: PLKWrmo8ueUCJFYOAAAD [Nest] 383 - 11/21/2025, 11:05:13 AM  LOG [Api:WebsocketRepository] Websocket Disconnect: PLKWrmo8ueUCJFYOAAAD [Nest] 383 - 11/21/2025, 11:07:57 AM  LOG [Api:WebsocketRepository] Websocket Connect: nfmzZOpE7S8eWBmKAAAF [Nest] 383 - 11/21/2025, 11:15:23 AM  LOG [Api:WebsocketRepository] Websocket Disconnect: nfmzZOpE7S8eWBmKAAAF [Nest] 383 - 11/21/2025, 11:24:03 AM  ERROR [Api:OAuthRepository~lfykheqc] OAuth login failed: invalid response encountered [Nest] 383 - 11/21/2025, 11:24:03 AM  ERROR [Api:OAuthRepository~lfykheqc] ClientError: invalid response encountered at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12) at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23) at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: OperationProcessingError: unexpected JWT "alg" header parameter at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12) at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19) at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5) at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: { header: { alg: 'ES384', kid: '5b761725acd1094b3c6028dc318a3f85', typ: 'JWT' }, expected: 'RS256', reason: 'client configuration' } } } [Nest] 383 - 11/21/2025, 11:24:03 AM  ERROR [Api:ErrorInterceptor~lfykheqc] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) [Nest] 383 - 11/21/2025, 11:26:26 AM  WARN [Api:ServerInfoRepository~boi5qqwi] Failed to read /opt/immich/app/build-lock.json [Nest] 383 - 11/21/2025, 11:26:28 AM  LOG [Api:WebsocketRepository] Websocket Connect: 5w-mIum5ri-IcWd4AAAH [Nest] 383 - 11/21/2025, 11:31:43 AM  LOG [Api:SystemConfigService~soledina] LogLevel=log (set via system config) [Nest] 96 - 11/21/2025, 11:31:43 AM  LOG [Microservices:SystemConfigService] LogLevel=log (set via system config) [Nest] 383 - 11/21/2025, 11:31:53 AM  LOG [Api:WebsocketRepository] Websocket Connect: 0URyRi0d8atoHkicAAAJ [Nest] 383 - 11/21/2025, 11:32:07 AM  LOG [Api:WebsocketRepository] Websocket Disconnect: 0URyRi0d8atoHkicAAAJ [Nest] 383 - 11/21/2025, 11:32:20 AM  ERROR [Api:OAuthRepository~i41p6rul] Error in OAuth discovery: TypeError: fetch failed [Nest] 383 - 11/21/2025, 11:32:20 AM  ERROR [Api:OAuthRepository~i41p6rul] TypeError: fetch failed at node:internal/deps/undici/undici:15845:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async performDiscovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:266:16) at async discovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:243:16) at async OAuthRepository.getClient (/opt/immich/app/dist/repositories/oauth.repository.js:88:20) at async OAuthRepository.authorize (/opt/immich/app/dist/repositories/oauth.repository.js:25:24) at async AuthService.authorize (/opt/immich/app/dist/services/auth.service.js:175:16) at async OAuthController.startOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:37:46) [Nest] 383 - 11/21/2025, 11:32:24 AM  ERROR [Api:OAuthRepository~fvk2y83d] Error in OAuth discovery: TypeError: fetch failed [Nest] 383 - 11/21/2025, 11:32:24 AM  ERROR [Api:OAuthRepository~fvk2y83d] TypeError: fetch failed at node:internal/deps/undici/undici:15845:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async performDiscovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:266:16) at async discovery (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:243:16) at async OAuthRepository.getClient (/opt/immich/app/dist/repositories/oauth.repository.js:88:20) at async OAuthRepository.authorize (/opt/immich/app/dist/repositories/oauth.repository.js:25:24) at async AuthService.authorize (/opt/immich/app/dist/services/auth.service.js:175:16) at async OAuthController.startOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:37:46) [Nest] 383 - 11/21/2025, 11:33:04 AM  LOG [Api:SystemConfigService~q1dsrtwh] LogLevel=log (set via system config) [Nest] 96 - 11/21/2025, 11:33:04 AM  LOG [Microservices:SystemConfigService] LogLevel=log (set via system config) [Nest] 383 - 11/21/2025, 11:33:12 AM  ERROR [Api:OAuthRepository~o551yd1i] OAuth login failed: invalid response encountered [Nest] 383 - 11/21/2025, 11:33:12 AM  ERROR [Api:OAuthRepository~o551yd1i] ClientError: invalid response encountered at e (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:116:12) at errorHandler (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:139:23) at authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:991:9)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: OperationProcessingError: unexpected JWT "alg" header parameter at OPE (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:116:12) at checkSigningAlgorithm (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1996:19) at validateJwt (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1722:5) at processGenericAccessTokenResponse (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1242:39)  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processAuthorizationCodeOAuth2Response (file:///opt/immich/app/node_modules/.pnpm/oauth4webapi@3.8.2/node_modules/oauth4webapi/build/index.js:1436:20) at async authorizationCodeGrant (file:///opt/immich/app/node_modules/.pnpm/openid-client@6.8.1/node_modules/openid-client/build/index.js:980:18) at async OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:56:28) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) { code: 'OAUTH_INVALID_RESPONSE', [cause]: { header: { alg: 'ES384', kid: '5b761725acd1094b3c6028dc318a3f85', typ: 'JWT' }, expected: 'RS256', reason: 'client configuration' } } } [Nest] 383 - 11/21/2025, 11:33:12 AM  ERROR [Api:ErrorInterceptor~o551yd1i] Unknown error: Error: OAuth login failed Error: OAuth login failed at OAuthRepository.getProfile (/opt/immich/app/dist/repositories/oauth.repository.js:72:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AuthService.callback (/opt/immich/app/dist/services/auth.service.js:188:25) at async OAuthController.finishOAuth (/opt/immich/app/dist/controllers/oauth.controller.js:47:22) ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7893