
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
- [SOLVED] Access ExecutionStatus of a fun...
I am calling a cloud function from the newest Flutter SDK 20.2.1with the `xasync: false` flag and get the result, but the `execution.status` is not a String and...
- Appwrite isn't accepting the api from se...
Error creating user: AppwriteException: Server Error type: 'general_unknown', response: '{"message":"Server Error","code":500,"type":"general_unknown","versi...
- Subject: Request for temporary quota lif...
Hi Appwrite Team, our nonprofit animal rescue app on Appwrite Cloud is currently throttled due to read‑quota limits, and we need a temporary increase so rescue ...
