Hello,
I am trying to authenticate user with google provider, but I got error when I try to login with Oauth2 method. I pass guest BackendlessUser instance, but got exception JsonUnsupportedObjectError, for BackendlessUser instance, NoSuchMethodError (NoSuchMethodError: Class ‘DateTime’ has no instance method ‘toJson’.)
googleSignInAccount = await _googleSignIn.signIn(); //pass ok
GoogleSignInAuthentication googleSignInAuthentication = await googleSignInAccount.authentication; //pass ok
BackendlessUser be = await Backendless.userService
.loginWithOauth2(
"googleplus",
googleSignInAuthentication.accessToken,
{"email": "email"},
true,
AuthServices.backendlessUser,
)
I am using:
backendless_sdk: ^6.2.0
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (5 weeks ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
Backendless Version (6.2.6, Online)
Client SDK Flutter
Application ID E06560C6-0B4C-05DF-FF4E-5A1AFAD4EB00