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
jrasm91
jrasm913y ago
Are you in the OAuth credentials section?
nVIceman
nVIcemanOP3y ago
Yes
jrasm91
jrasm913y ago
You did a new OAuth 2 client?
nVIceman
nVIcemanOP3y ago
Yea, created project, setup consent screen with defaults, created web app client.
jrasm91
jrasm913y ago
I think the web application type automatically does confidential plus auth code
nVIceman
nVIcemanOP3y ago
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.
jrasm91
jrasm913y ago
Yeah so you need to add a redirect uri In Google console for your newly created client
nVIceman
nVIcemanOP3y ago
http://immich.mydomain.com/auth/login and user-settings I put in. Something else? I put https actually since I am using SSL.
jrasm91
jrasm913y ago
For the mobile app the work with oauth you'll need to put the mobile redirect one as well And turn that setting on
nVIceman
nVIcemanOP3y ago
app.immich:/? Google won't accept.
jrasm91
jrasm913y ago
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
nVIceman
nVIcemanOP3y ago
Google doesn't accept /api/oauth/mobile-redirect either.
jrasm91
jrasm913y ago
You need to add https and your domain
nVIceman
nVIcemanOP3y ago
I put hotname first? Ah, yes.
jrasm91
jrasm913y ago
That's just the path portion If you have an iphone though, i think there is an existing bug with iOS + Google OAuth.
nVIceman
nVIcemanOP3y ago
Android It's all working, thanks.
Alex Tran
Alex Tran3y ago
Oh my I keep forgetting to check this for the log
minch
minch3y ago
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
jrasm91
jrasm913y ago
We've fixed the bug and it will be patched in the next sever release.
jrasm91
jrasm913y ago
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=...

Did you find this page helpful?