I
Immich2d ago
ryacom

Web app OAuth with Entra not working on v1.132.3

Sadly even after updating to v1.132.3, OAuth is not working in the web app. After downgrading to v1.131.3, it works.
[Nest] 17 - 04/28/2025, 2:52:03 PM ERROR [Api:OAuthRepository~sentehmf] Error in OAuth discovery: TypeError: fetch failed
[Nest] 17 - 04/28/2025, 2:52:03 PM ERROR [Api:OAuthRepository~sentehmf] TypeError: fetch failed
at node:internal/deps/undici/undici:13502:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async performDiscovery (file:///usr/src/app/node_modules/openid-client/build/index.js:266:16)
at async discovery (file:///usr/src/app/node_modules/openid-client/build/index.js:243:16)
at async OAuthRepository.getClient (/usr/src/app/dist/repositories/oauth.repository.js:86:20)
at async OAuthRepository.authorize (/usr/src/app/dist/repositories/oauth.repository.js:24:24)
at async AuthService.authorize (/usr/src/app/dist/services/auth.service.js:124:16)
at async OAuthController.startOAuth (/usr/src/app/dist/controllers/oauth.controller.js:36:46)
[Nest] 17 - 04/28/2025, 2:52:03 PM ERROR [Api:OAuthRepository~sentehmf] Error in OAuth discovery: TypeError: fetch failed
[Nest] 17 - 04/28/2025, 2:52:03 PM ERROR [Api:OAuthRepository~sentehmf] TypeError: fetch failed
at node:internal/deps/undici/undici:13502:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async performDiscovery (file:///usr/src/app/node_modules/openid-client/build/index.js:266:16)
at async discovery (file:///usr/src/app/node_modules/openid-client/build/index.js:243:16)
at async OAuthRepository.getClient (/usr/src/app/dist/repositories/oauth.repository.js:86:20)
at async OAuthRepository.authorize (/usr/src/app/dist/repositories/oauth.repository.js:24:24)
at async AuthService.authorize (/usr/src/app/dist/services/auth.service.js:124:16)
at async OAuthController.startOAuth (/usr/src/app/dist/controllers/oauth.controller.js:36:46)
No description
39 Replies
Immich
Immich2d ago
:wave: Hey @ryacom, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
FPSRhinoPK
FPSRhinoPK2d ago
Having the same issue with Authentik.
Daniel
Daniel2d ago
The container cannot reach the issuer URL
ryacom
ryacomOP2d ago
Whelp it worked after downgrading the other day but now it does not. I will have to do some more digging.
Daniel
Daniel2d ago
There have been OAuth issues that were fixed with today's release, but the error you got clearly says it's just a connection issue
ryacom
ryacomOP2d ago
I can curl the URL from outside the container but not inside so something is obviously wrong with my setup, though I am not sure what changed
Daniel
Daniel2d ago
What's the error you're getting? DNS?
ryacom
ryacomOP2d ago
Yeah "could not resolve host". OAuth was definitely broken with 1.132 but this is obviously some other issue I need to sort out Well that's strange, if I exec into my Gitea container for example, it works After down and up the curl works but there is still a problem
[Nest] 17 - 04/28/2025, 3:41:17 PM ERROR [Api:ErrorInterceptor~o7amz1qg] Unknown error: ResponseBodyError: server responded with an error in the response body
ResponseBodyError: server responded with an error in the response body
at checkOAuthBodyError (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:865:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async processGenericAccessTokenResponse (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1141:5)
at async processAuthorizationCodeOAuth2Response (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1373:20)
at async authorizationCodeGrant (file:///usr/src/app/node_modules/openid-client/build/index.js:850:18)
at async OAuthRepository.getProfile (/usr/src/app/dist/repositories/oauth.repository.js:52:28)
at async AuthService.callback (/usr/src/app/dist/services/auth.service.js:137:25)
at async OAuthController.finishOAuth (/usr/src/app/dist/controllers/oauth.controller.js:46:22)
[Nest] 17 - 04/28/2025, 3:41:17 PM ERROR [Api:ErrorInterceptor~o7amz1qg] Unknown error: ResponseBodyError: server responded with an error in the response body
ResponseBodyError: server responded with an error in the response body
at checkOAuthBodyError (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:865:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async processGenericAccessTokenResponse (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1141:5)
at async processAuthorizationCodeOAuth2Response (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1373:20)
at async authorizationCodeGrant (file:///usr/src/app/node_modules/openid-client/build/index.js:850:18)
at async OAuthRepository.getProfile (/usr/src/app/dist/repositories/oauth.repository.js:52:28)
at async AuthService.callback (/usr/src/app/dist/services/auth.service.js:137:25)
at async OAuthController.finishOAuth (/usr/src/app/dist/controllers/oauth.controller.js:46:22)
Daniel
Daniel2d ago
Check the logs of your IDP?
ryacom
ryacomOP2d ago
It's Microsoft Entra so I don't think there is much I can see other than "successful login." However now if I downgrade back to v1.131.3, it works.
Daniel
Daniel2d ago
Microsoft :monkaW:
FPSRhinoPK
FPSRhinoPK2d ago
Lol
ryacom
ryacomOP2d ago
It's free and I like Microsoft Authenticator :)
Daniel
Daniel2d ago
Is this error only thrown when logging in with mobile?
FPSRhinoPK
FPSRhinoPK2d ago
Wait a week they will call it something else.
Daniel
Daniel2d ago
What does Microsoft authenticator have to do with using entra You can self-host any IDP, it's also free
ryacom
ryacomOP2d ago
Web, app doesn't work but I haven't looked at the logs
Daniel
Daniel2d ago
How do your entra settings look like?
ryacom
ryacomOP2d ago
Authenticator lets you do passwordless auth with push notifications
Daniel
Daniel2d ago
May I introduce you to: webauthn/passkeys? :P
ryacom
ryacomOP2d ago
Any settings in particular? There aren't very many, just the redirect URIs and secret
Daniel
Daniel2d ago
Yes, the authentication method
ryacom
ryacomOP2d ago
I saw the discussion around that for Authelia but I don't see a similar option anywhere in Entra Does this help? https://login.microsoftonline.com/048699d0-4e5d-4e9b-9187-bab11918ee4d/v2.0/.well-known/openid-configuration
Daniel
Daniel2d ago
So you should be able to change it to _post
No description
Daniel
Daniel2d ago
I have no clue how you can configure that in the worst IDP in existence though
ryacom
ryacomOP2d ago
I am not following, isn't client_secret_post the desired setting? If I am interpreting the metadata correctly that is currently a supported method
Daniel
Daniel2d ago
Correct, that's what it should be Entra supports it, which is what I said, yes You'll probably need to configure it to use it though
ryacom
ryacomOP2d ago
I am not sure if controlling that is possible I guess I am going back to password login, unless there is some magic setting I don't know about Not sure what else to say, I have 23 other apps doing SSO with Microsoft that work
jrasm91
jrasm912d ago
Can you share a screenshot of the app configuration screen on entra? It also looks like entra supports pkce so if you change the app type to that I believe it might just start working as well
SJ-tech
SJ-tech22h ago
I also have issues with entra id after upgrading to 1.132.3, My app config on entra looks like this. And I get the error [Nest] 17 - 04/29/2025, 7:03:41 AM ERROR [Api:ErrorInterceptor~3umswvnq] Unknown error: ResponseBodyError: server responded with an error in the response body ResponseBodyError: server responded with an error in the response body at checkOAuthBodyError (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:865:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async processGenericAccessTokenResponse (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1141:5) at async processAuthorizationCodeOAuth2Response (file:///usr/src/app/node_modules/oauth4webapi/build/index.js:1373:20) at async authorizationCodeGrant (file:///usr/src/app/node_modules/openid-client/build/index.js:850:18) at async OAuthRepository.getProfile (/usr/src/app/dist/repositories/oauth.repository.js:52:28) in the immich-server container when trying to authenicate. The only log I can find on the entra side says that the login went fine...
No description
SJ-tech
SJ-tech22h ago
No description
SJ-tech
SJ-tech21h ago
Or rather like this works on earlier version but neither way works on 1.132.3
SJ-tech
SJ-tech21h ago
No description
SJ-tech
SJ-tech21h ago
This was the one I tested but when troubleshooting but that didn't work with either 1.132.3 or 1.131.3 but gave different issues.
No description
Daniel
Daniel20h ago
Where do you get that from? The well known endpoint doesn't imply that What options do you get when clicking on "add platform"?
SJ-tech
SJ-tech19h ago
Is what I get as options.
No description
Daniel
Daniel18h ago
Ah hm that doesn't really help :/
SJ-tech
SJ-tech18h ago
No not really sadly :/
jrasm91
jrasm9117h ago
Id like to figure out what the problem is. Is there any way you can create a test account that I can use to login with?

Did you find this page helpful?