Google OAuth reports redirect_uri_mismatch, but my console shows no redirect url form

50 Views Asked by At

I have a windows desktop application that needs to access Google Drive. The OAuth 2.0 Client ID is of type "Desktop". Apparently this is not deprecated. According to the documenation only Android, Chrome app, and iOS OAuth client types are deprecated as of 2022.

So in the past this worked fine by passing "http://127.0.0.1:8000" as the redirect URL, in order to get the access code from the title of the returned document. Now I get a return page from Google with the message "Hmmm… can't reach this page. 127.0.0.1 refused to connect." And no access code in the title!

So I tried to change the URl to something actually existing/listening.

Now I get "redirect_uri_mismatch": I know that I have to go to my Cloud Console > Credentials > OAuth 2.0 Client IDs > Edit, and here I am supposed to set the secret and redirect URLs.

All fine, except there is no entry form for redirect URLs!

The console reports no error and says all servicves are running.

Can someone tell me where I am supposed to enter the redirect URLs? Or is this now also deprecated for desktop apps? How am I supposed to do this now? The google documentation is not helping.

0

There are 0 best solutions below