
Hi all,
I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutter app remains on the appwrite hoted success page (Black screen). I'd like this is come back to the app and log the user in.
Here is my signInWithProvider funciton which lives my AuthAPI
signInWithProvider({required OAuthProvider provider}) async {
try {
final session = await account.createOAuth2Session(provider: provider);
await Future.delayed(const Duration(microseconds: 500));
_currentUser = await account.get();
_status = AuthStatus.authenticated;
return session;
} finally {
notifyListeners();
}
}

Iirc the success page should trigger a deep link to your app. Any errors, warnings? Not sure if flutter side requires deeplinks logic.

Sorry, just realised those parameters were only there for testing. I didnt have them in originially

Do you have added this to the android manifest file?
<!-- Add this inside the `<application>` tag, along side the existing `<activity>` tags -->
<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>

Yep I do!

And changed the projectID?

This is happening in android?

Should that project id be in the appwrite project id?

Yes

You had there the app id?

bare with hang on

I was being really silly and miss typed it. Thanky you so much for the speedy response!!

This is working now. Feel free to close the ticket!

No worries! We are here to help 🙂

Could you point me where to start for apple's oauth process? I cant find your docs

Great! If you find any other issues, create a new post and we will help again 😄

Sure. In the case of apple it's somewhat similar to Google: https://appwrite.io/docs/references/cloud/client-flutter/account#createOAuth2Session
Hope this tutorial helps too with the config: https://appwrite.io/integrations/oauth-apple

[SOLVED] OAuth With Google & Flutter
Recommended threads
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- 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...
- [bug] API response is good but UI don't ...
Hi guys! When i got my object, it have billingInfo relation, in the web ui i just got pading state, and the row shows object is null, but when i work whit this...
