Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immichβ€’4y agoβ€’
19 replies
stijnos

Unable to complete OAuth login - Immich & Authentik

Hi!

So I'm setting up OAuth login. I'm using Authentik. I created an OAuth2/OpenID Provider and Application using the docs.
The button to login with OAuth shows up and I get redirected correctly to Authentik. I'm prompted for my username, password, then a consent screen for using my email.. I'm then redirected back to Immich and the URL changes <immich>/auth/login?code=xxxxxx&state=xxxxxxxxx But then the login fails, I'm back at the Immich login and the text "Unable to complete OAuth login" appears.

I found the following error in the Immich server log:

[Nest] 7  - 12/21/2022, 6:37:04 PM   ERROR [ExceptionsHandler] outgoing request timed out after 3500ms
RPError: outgoing request timed out after 3500ms
    at /usr/src/app/node_modules/openid-client/lib/helpers/request.js:137:13
    at async Client.grant (/usr/src/app/node_modules/openid-client/lib/client.js:1316:22)
    at async Client.callback (/usr/src/app/node_modules/openid-client/lib/client.js:476:24)
    at async OAuthService.callback (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/oauth/oauth.service.js:46:24)
    at async OAuthController.callback (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/oauth/oauth.controller.js:33:31)
    at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:46:28
    at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17
[Nest] 7  - 12/21/2022, 6:37:04 PM   ERROR [ExceptionsHandler] outgoing request timed out after 3500ms
RPError: outgoing request timed out after 3500ms
    at /usr/src/app/node_modules/openid-client/lib/helpers/request.js:137:13
    at async Client.grant (/usr/src/app/node_modules/openid-client/lib/client.js:1316:22)
    at async Client.callback (/usr/src/app/node_modules/openid-client/lib/client.js:476:24)
    at async OAuthService.callback (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/oauth/oauth.service.js:46:24)
    at async OAuthController.callback (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/oauth/oauth.controller.js:33:31)
    at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:46:28
    at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17

I can't figure out why there is a time out and at what part of the login flow. Is it a connection / firewall issue?
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Oauth Immich with Authentik
ImmichIImmich / help-desk-support
3y ago
Unable to login with OAuth
ImmichIImmich / help-desk-support
5w ago
oauth not working authentik
ImmichIImmich / help-desk-support
8mo ago
ERROR [AuthService] Unable to complete OAuth login: RPError: failed to validate JWT signature
ImmichIImmich / help-desk-support
3y ago