Backendless Version (5.x)
Client SDK (Swift )
Application ID 2E6E6142-3600-6FA9-FF2E-462B0F504F00
Converting Guest user to logged in user via Google Sign
- Login user as Guest
- User elects to sign in via Goolge in
- Google login Sing in Successful
- Backendless loginWithGoogle should convert guest user to normal user.
In our App we allow one user to be logged in at a time, converting a guest user to a signed in user via backendless works flawlessly, however if a user attempts to login via google we are getting 3002 error
“User is already logged in from another device/computer. The application is configured to disable multiple concurrent logins with the same user credentials.”
we are aware that the issue is due the guest user being persisted.
As you can surely aware we can only pass in access token in the below mehtod
public func loginWithGoogle(accessToken: String, fieldsMapping: [String: String], responseHandler: ((BackendlessUser) -> Void)!, errorHandler: ((Fault) -> Void)!)
When converting a guest user to a Backendless user we use the below method and we can pass in a Backendless user as a parameter which in turn takes care of the user conversion.
public func registerUser(user: BackendlessUser, responseHandler: ((BackendlessUser) -> Void)!, errorHandler: ((Fault) -> Void)
- Login as Guest works as expected
- Google Sign in works as expected,
- Backendless login with google fails with error 3002
One work around is to logout the Guest user before google sign, however this would cause the Guest user to lose any data that was previously saved to Backendless. This is due to the user objectId being different.
Any suggestions, recommendations are highly appreciated and welcome.