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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support 👋 I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...