Skip to content
Back

Google & Apple OAuth2 not working in Appwrite Flutter SDK

  • 0
  • Flutter
  • Auth
Ankit Maniya
28 May, 2025, 17:49

Two days ago, the OAuth2-based login/signup was working as expected. Today, when I try to log in with an existing user using Apple OAuth2, it shows the message in the attached image.

For Google OAuth2, it doesn't return any error message, but the login doesn't seem to work either.

Has anything changed in the past two days for Google or Apple OAuth2?

I think appwrite cloud version is Version 1.7.4 & my appwrite sdk version for flutter is ^15.0.1 does this create issue??

TypeScript
 await _account
        .createOAuth2Session(provider: oauthProvider, scopes: scopes)
        .then((value) async {
      print("createOAuth2Session value :: $value");
      // below function will set the _userSessionInfo value
      await _checkSessions();

      await getDocument(
              _databaseId, _usersCollectionId, _userSessionInfo['userId'])
          .then((user) async {
        // make user online when createOAuth2Session performed
        await _manageDocument(
          _databaseId,
          _usersCollectionId,
          documentId: user.$id,
          isUpdate: true,
          data: {
            "isOnline": true,
          },
        );
      }).catchError((error) async {
        print("Get Document Error: $error");
        if (error is AppwriteException) {
          if (error.type == "document_not_found") {
            await _manageDocument(
              _databaseId,
              _usersCollectionId,
              documentId: _userSessionInfo['userId'],
              data: {
                "name": _userSessionInfo['name'],
                "isOnline": true,
              },
            );
          }
        }
      });
    }).catchError((error) {
      print("createOAuth2Session Error: $error");
    });
TL;DR
Google and Apple OAuth2 not working in Appwrite Flutter SDK. Issue arose with OAuth2 login/signup, error message shown for Apple OAuth2, Google OAuth2 not functioning. Possibly related to Appwrite cloud version `1.7.4` and Flutter SDK version `^15.0.1`. **Solution:** Update Flutter SDK For Appwrite.
Ankit Maniya
28 May, 2025, 17:56

Google & Apple OAuth2 not working in Appwrite Flutter SDK

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more