Back

[SOLVED] Loopback flow blocked in Google OAuth

  • 0
  • Users
  • Flutter
  • General
  • Apple
PoojaBhaumik
21 Mar, 2023, 20:03

Tried to attempt the Google OAuth flow for a Flutter client app, but instead of the consent screen, it shows that access is blocked because of some loopback flow being banned. I read a bit about it, and it seems it needed an update of the mobile native SDKs. Here: https://developers.google.com/identity/protocols/oauth2/resources/loopback-migration#migrate-to-a-supported-alternative

Unable to say if it was updated for the latest Flutter packages or not, or if there is another way I can fix this?

Info: Appwrite Flutter verson: 8.3.0 Targeting Platform: iOS

TL;DR
The user encountered an issue with the Google OAuth flow in their Flutter app. They initially set the application type for the OAuth client ID as iOS instead of web. They created a web client ID and updated the redirect URI, which resolved the issue. They had some confusion about the redirect URI, but it was clarified that it should point to the appwrite instance. There was no need to pass success or failure for the create OAuth2 session API call in Flutter. The user mentioned that the loopback flow was blocked, and it was suggested that the mobile native SDKs may need an update.
Drake
21 Mar, 2023, 20:19

interesting...For flutter, you shouldn't be passing a success or failure for the create OAuth2 session API call. In addition, the redirect uri in google should be set to point to your appwrite instance. is that what you've done?

PoojaBhaumik
21 Mar, 2023, 20:42

Success and failure is empty.

Can you tell me more about the redirect URI thing, I'm a bit confused about that

Drake
21 Mar, 2023, 20:45

When you setup oauth2 in Google, you need to put a redirect URI. That should be something like:

TypeScript
https://[DOMAIN]/v1/account/sessions/oauth2/callback/google/[PROJECT ID]
PoojaBhaumik
21 Mar, 2023, 21:01

My bad. My application type for OAuth client Id was iOS and not web, which is why it wasnt working I guess. Created a web client Id and it works, thank you!

Drake
21 Mar, 2023, 21:09

[SOLVED] Loopback flow blocked in Google OAuth

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more