[BUG] redirect_uri_mismatch (Bad Request) ios oauth #637

Closed
opened 2026-02-04 21:36:43 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @zichichi on GitHub (Jan 31, 2023).

Originally assigned to: @jrasm91 on GitHub.

I correctly configured access via google oauth2, I can access from the web but not from ios. I put the parameter in Mobile Redirect URI Override like this:
https://xxx.xxx.com/api/oauth/mobile-redirect

the log on the server:

1/01/2023 12:27:56 [Nest] 1 - 01/31/2023, 11:27:56 AM ERROR [ExceptionsHandler] redirect_uri_mismatch (Bad Request) 31/01/2023 12:27:56 OPError: redirect_uri_mismatch (Bad Request) 31/01/2023 12:27:56 at processResponse (/usr/src/app/node_modules/openid-client/lib/helpers/process_response.js:38:13) 31/01/2023 12:27:56 at Client.grant (/usr/src/app/node_modules/openid-client/lib/client.js:1327:22) 31/01/2023 12:27:56 at runMicrotasks (<anonymous>) 31/01/2023 12:27:56 at processTicksAndRejections (node:internal/process/task_queues:96:5) 31/01/2023 12:27:56 at async Client.callback (/usr/src/app/node_modules/openid-client/lib/client.js:476:24) 31/01/2023 12:27:56 at async OAuthCore.callback (/usr/src/app/dist/apps/immich/libs/domain/src/oauth/oauth.core.js:49:24) 31/01/2023 12:27:56 at async OAuthService.login (/usr/src/app/dist/apps/immich/libs/domain/src/oauth/oauth.service.js:35:25) 31/01/2023 12:27:56 at async OAuthController.callback (/usr/src/app/dist/apps/immich/apps/immich/src/controllers/oauth.controller.js:34:38) 31/01/2023 12:27:56 at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:46:28 31/01/2023 12:27:56 at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17

Originally created by @zichichi on GitHub (Jan 31, 2023). Originally assigned to: @jrasm91 on GitHub. I correctly configured access via google oauth2, I can access from the web but not from ios. I put the parameter in Mobile Redirect URI Override like this: https://xxx.xxx.com/api/oauth/mobile-redirect the log on the server: `1/01/2023 12:27:56 [Nest] 1 - 01/31/2023, 11:27:56 AM ERROR [ExceptionsHandler] redirect_uri_mismatch (Bad Request) 31/01/2023 12:27:56 OPError: redirect_uri_mismatch (Bad Request) 31/01/2023 12:27:56 at processResponse (/usr/src/app/node_modules/openid-client/lib/helpers/process_response.js:38:13) 31/01/2023 12:27:56 at Client.grant (/usr/src/app/node_modules/openid-client/lib/client.js:1327:22) 31/01/2023 12:27:56 at runMicrotasks (<anonymous>) 31/01/2023 12:27:56 at processTicksAndRejections (node:internal/process/task_queues:96:5) 31/01/2023 12:27:56 at async Client.callback (/usr/src/app/node_modules/openid-client/lib/client.js:476:24) 31/01/2023 12:27:56 at async OAuthCore.callback (/usr/src/app/dist/apps/immich/libs/domain/src/oauth/oauth.core.js:49:24) 31/01/2023 12:27:56 at async OAuthService.login (/usr/src/app/dist/apps/immich/libs/domain/src/oauth/oauth.service.js:35:25) 31/01/2023 12:27:56 at async OAuthController.callback (/usr/src/app/dist/apps/immich/apps/immich/src/controllers/oauth.controller.js:34:38) 31/01/2023 12:27:56 at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:46:28 31/01/2023 12:27:56 at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17`
Author
Owner

@jrasm91 commented on GitHub (Jan 31, 2023):

Can you confirm what version of the mobile app and server you are using? Also, can you confirm that you have added https://xxx.xxx.com/api/oauth/mobile-direct as a redirect URI in the google oauth configuration?

@jrasm91 commented on GitHub (Jan 31, 2023): Can you confirm what version of the mobile app and server you are using? Also, can you confirm that you have added https://xxx.xxx.com/api/oauth/mobile-direct as a redirect URI in the google oauth configuration?
Author
Owner

@zichichi commented on GitHub (Jan 31, 2023):

iOS app version: 1.43.0
Server version: 1.43.1
uri is add in Google auth config.

@zichichi commented on GitHub (Jan 31, 2023): iOS app version: 1.43.0 Server version: 1.43.1 uri is add in Google auth config.
Author
Owner

@jrasm91 commented on GitHub (Feb 2, 2023):

Yeah looks like this is a bug. It is specific to iOS. Thanks for reporting.

I'll work with one of the devs with an iphone to see if we can't get it fixed.

@jrasm91 commented on GitHub (Feb 2, 2023): Yeah looks like this is a bug. It is specific to iOS. Thanks for reporting. I'll work with one of the devs with an iphone to see if we can't get it fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#637