Appwrite: oAuth2 Authentication does not work for Android (Missing Redirect URL)

Created on 10 Apr 2021  ·  3Comments  ·  Source: appwrite/appwrite

🐛 Bug Report

I'm using Appwrite's oAuth2 authentication system for my Flutter app. In general for Apple devices everything works like a charm. But I found some problems for Android devices. While for apple devices I can authenticate, all my Android devices shows me "Missing redirect URL". I think the problem is the external browser which opens. Apple opens an In App Browser, but Android an external one.

Have you spent some time to check if this issue has been raised before?

Yes – I can find nothing about this problem.

To Reproduce

  • Create Flutter App
  • Setup Appwrite oAuth2 authentication, for example with provider Google
  • Test it on an Android device

Expected behavior

With Apple devices authentication works very good. So I would expect the same behavior for Android devices.

Actual Behavior

See above.

Is this a known issue? Or it is my fault maybe?

bug

All 3 comments

Hey @Asored-D,

Have you added this part to your Android manifest file?

image

You can also use the Flutter Playground to try and debug if this is an issue with Appwrite or your implementation: https://github.com/appwrite/playground-for-flutter

Wow. This was a crazy fast answer! 😁 Thanks @eldadfux ... I've checked it. And.... yes and no! I've added this part to my AndroidManifest, but...last week I've changed my server environment and I got a new Appwrite project ID...so the ID on appwrite-callback-{id} was wrong! I will change this and try again.

Many thanks!

Confirmation: It works. Thank you for this good advice. 👍

Was this page helpful?
0 / 5 - 0 ratings