Sorry to bother you again but I spent hours trying to setup Google Auth with this plugin.
Im using the ^2.0.0-nullsafety.2 null safe version with google_sign_in: ^5.2.1. .
I switched between enabling openid and not(excluded it from the scopes also).
serverClientId is the clientId from Google Cloud after creating a Web App(I also created a android/ios App inside Google Cloud Console).
MongoDb Provider Setup:
Filled that with The Web Application Client Id and Secret etc.
dart code:
RealmApp.init("...");
// ...
Future<void> authenticate() async {
final RealmApp app = RealmApp();
final scopes = ['openid','profile', 'email']; // tried without openid also
//const clientId = "normallyHereWouldBeMyId.apps.googleusercontent.com";
const web = "normallyHereWouldBeMyId"; // Web Application Client Id
final mongoUser = await app.login(
Credentials.google(
serverClientId: web, // just the start from "<ID>.apps.googleusercontent.com"
scopes: scopes,
));
print("EMAIL: ${mongoUser?.profile?.email}");
}
I added a console log to your plugin to get some error codes and recieved those messages (after the google sign in pop gets closed)
When openId is enabled:
AUTH_ERROR(realm::app::ServiceError:47): token contains an invalid number of segments
Sorry to bother you again but I spent hours trying to setup Google Auth with this plugin. Im using the ^2.0.0-nullsafety.2 null safe version with google_sign_in: ^5.2.1. . I switched between enabling openid and not(excluded it from the scopes also). serverClientId is the clientId from Google Cloud after creating a Web App(I also created a android/ios App inside Google Cloud Console).
MongoDb Provider Setup: Filled that with The Web Application Client Id and Secret etc.
dart code:
I added a console log to your plugin to get some error codes and recieved those messages (after the google sign in pop gets closed) When openId is enabled:
When openId is disabled:
It could be related to this issue but Im not sure: https://github.com/realm/realm-java/issues/7578
Do you maybe have any idea to help me here, thanks