
so to capture the Appwrite OAuth callback url you need to add a seperate activity tag

<activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" android:exported="true">
<intent-filter android:label="flutter_web_auth_2">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="appwrite-callback-[PROJECT_ID]" />
</intent-filter>
</activity>
add this as a separate activity along side the existing activity tags thats there when you create the project and it should work

it's giving me option to pick rather than autodirect could it be because of multiple activity?

yup I guess

havn't seen this before

Let me know if you are able to oauth

yup seems so , anyway i have removed to other one as it was also for redirect after auth0 for another service , as i will be using appwrite the one you gave is enough , thanks!

i mean i am being redirect now to app itself but its null
idk if i need to wait or make callback
this is current code
Future<void> handelFacebookSigin() async {
final user = await account.createOAuth2Session(provider: 'facebook');
print(user);
}
when the redirect happens and logs is : I/flutter ( 9989): null

could it be beacuse the user aleardy exist , as we are using createauth?

Check if the user is being added to your appwrite project

To answer this once your app is authenticated with oauth provide you can access the user data using getAccount method

i deleted it from appwrite project
i clicked facebook login > it said i had previous logged and click continued > redirect > logs null > but looking at appwrite project the user is created and verfied

The createOAuth2Session function does not return anything

ah

To retrieve the user you have to use account.get()
after use the createOAuth2Session

That means the user is being added. You can access the user details with getAccount method


ah okay! i thought it would return with session id and use that to get data , lemme try!

and yup it's working correctly, thanks again!

should i close the post or just rename it to solved

Rename solved

Alight!

[Solved] Getting Missing Redirect on Google OAuth login

I am getting the same issue mentioned https://discord.com/channels/564160730845151244/1140629660170981416/1140653790253559829 i.e after calling createOAuth2Session its giving me option to pick rather than autodirect could it be because of multiple activity? Is there any workaround?

Please create a new post instead of posting in an old thread
Recommended threads
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
