OAuth Google Setup
Client type should be Confidential it says in the guide, but I cannot find this anywhere in the Google Cloud console.
The Grant type should be Authorization Code. I don't see this either.
20 Replies
Are you in the OAuth credentials section?
Yes
You did a new OAuth 2 client?
Yea, created project, setup consent screen with defaults, created web app client.
I think the web application type automatically does confidential plus auth code
Okay, can proceed then and see how it goes. Although don't understand this. "Configure an http(s) endpoint to forwards requests to app.immich:/"
Immich has a route (/api/oauth/mobile-redirect) that is already configured to forward requests to app.immich:/, and can be used for step 1.
This seems to say I don't need to do that I guess.
2 and 3 still don't get though.
Whitelist the new endpoint as a valid redirect URI with your provider.
Specify the new endpoint as the Mobile Redirect URI Override, in the OAuth settings.
Yeah so you need to add a redirect uri
In Google console for your newly created client
http://immich.mydomain.com/auth/login and user-settings I put in. Something else?
I put https actually since I am using SSL.
For the mobile app the work with oauth you'll need to put the mobile redirect one as well
And turn that setting on
app.immich:/?
Google won't accept.
The web should be working now though.
You have to add the /api/oauth/mobile-redirect one
Since the mobile app one is invalid, so it is a bit of a work around
Google doesn't accept /api/oauth/mobile-redirect either.
You need to add https and your domain
I put hotname first?
Ah, yes.
That's just the path portion
If you have an iphone though, i think there is an existing bug with iOS + Google OAuth.
Android
It's all working, thanks.
Oh my I keep forgetting to check this for the log
I can confirm, the setup is working for android. On iPhone, i am able to see the oauth option but I can't connect. I will provide the exact error message and log in the coming days
We've fixed the bug and it will be patched in the next sever release.
GitHub
fix(server): oauth mobile callback url by jrasm91 · Pull Request #2...
Fixes #1495, which for some reason would redirect to the app with the url app.immich:///?code=...