Hello Team -
I’m implementing Google Authentication for my iOS App using Native Google SDK’s. Once the authentication is done, I have implemented the following code in signIn delegate. When i try to test the same, i get fault code :FAULT = ‘9022’ [Malformed JWS, unable to decode signature] <Malformed JWS, unable to decode signature> error.
Is loginWithGooglePlusSDK method supported for iOS? If so, can you please let me know if i’m doing anything wrong or point me to the right documentation?
func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!, withError error: NSError!) {
if (error == nil) {
// Perform any operations on signed in user here.
let userId = user.userID
let accessToken = user.authentication.idToken
let permissions = ["email"]
let fieldsMapping = [
"name": "name",
"email": "email"
]
backendless.userService.loginWithGooglePlusSDK(userId, accessToken: accessToken, permissions: permissions, fieldsMapping: fieldsMapping,
response: {
(user: BackendlessUser!) -> Void in
print("user :\(user)")
}, error: {
(fault: Fault!) -> Void in
print("fault code :\(fault)")
}
)
}
Hi Vyacheslav - Thanks for looking into this issue. I have uploaded the project into google drive and shared the link with you via email (support@backendless.com). I saw the easyLoginWithGooglePlusFieldMapping but wanted to try using the Google SDK for few other reasons. Let me know how to make it work.
I tried updating the Backendless version to 3.0.10, but i get a different error right now.
fault code :FAULT = ‘9010’ [Invalid social identity] <Invalid social identity>
I looked at your social settings configuration, looks like you have copied the CLIENT_ID and REVERSE_ID to Google Plus ID and Google Plus Secret. Is this correct? I have copied the CLIENT_ID and CLIENT_SECRET from google console and it works with easyLoginWithGooglePlusFieldsMapping method.
Please see screenshots above - you should set the Google options of the Social Setting bookmark on your Backendless app dashboard so, that they will be associated with GoogleService-Info.plist options from your project:
‘Google Plus ID’ = CLIENT_ID
‘Google Plus Secret’ = REVERSED_CLIENT_ID