Back

Question for the createOAuth2Session for Andriod

  • 0
  • Android
  • Flutter
  • Web
  • Cloud
Patrick Lee
17 Jan, 2024, 08:34

Dear all,

I am using Windows 11 VS Code to create the Flutter app to login using Appwrite OAuth to sign Google account. When I tested it on Andriod emulator, it goes to the blank screen after I login google account. I have updated the information on C:...\android\app\src\main\AndroidManifest.xml. Please see the attached screen dump.

Does anyone what is wrong on AndroidManifest.xml?

Because It is worked when I run the Flutter Web. It is successfully to sign in Google account and redirect to the Success URL. Here is the code for your reference.

TypeScript
          .createOAuth2Session(
        provider: provider,
        failure: kIsWeb ? '${location?.origin}' : null,
        success: kIsWeb ? '${location?.origin}' : null,
      )```

BTW, I have another question for the Flutter Web on this Appwrite OAuth sign on.  Is it possible to use the same browser tab to login Google account?  When I click the Google Sign in button, it launches a new Windows of Chrome browser.  Once it is successfully signed in, it redirect to web home page but it has 2 tabs of my web site.

Regards
TL;DR
The developer is experiencing an issue with their Flutter app on an Android emulator. After logging in with a Google account, the app displays a blank screen. They have updated the AndroidManifest.xml file but are unsure if there is an error in it. The app works fine when run on Flutter Web. They also have a question about using the same browser tab for Google Sign in on Flutter Web, as it currently opens a new window with two tabs. Solution: It is recommended to check the AndroidManifest.xml file for any errors. Additionally, for Flutter Web, developers may need to modify the code to ensure that Google Sign in opens in the
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