AsdshadowOriginal post
Rank 2: Process
Good day I have set up google oauth2 but for some reason it sticks on account.google.com
my createoath2 function
singInWithProvider({required String provider}) async {
try {
await account.createOAuth2Session(
provider: provider,
);
await Future.delayed(const Duration(microseconds: 500));
await loadUser();
return null;
} catch (e) {
debugPrint("$e");
} finally {
notifyListeners();
}
}
I also added the clientId and app secret in appwrite and this is my android manifest
<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-[I put my project id here]" />
</intent-filter>
</activity>
for my first login it asked me for my user account but it never created a user or a session. and it has not worked after. it hangs accounts.google.com
Summary
Google OAuth2 setup seems to be stuck on accounts.google.com. The provided function appears to be missing crucial steps for user creation and session handling. Ensure proper configuration of client ID, app secret, and Android manifest. Additionally, consider debugging for any errors.