Start a new topic
Answered

Sign in a user with a social identity.

Hi Could u please give me an example how to sign in a user with a facebook social identity ( User.login(authSource: .facebook,........)? Thanks Best Regards Alex


Best Answer

Hi Wood,


Please check following links for more information on Login with Social Identities:

Service Settings

IdP Settings

MIC Facebook

MIC Authenticate


Also, please check our sample app demonstrating 'Facebook Login with Kinvey' on this link. Following is the code snippet from this link:


User.login(authSource: .facebook, ["access_token" : accessToken.authenticationToken]) { user, error in
if let user = user {
print(user)
self.userLabel.text = "User ID: \(user.userId)"
} else {
print(error ?? "unknow error")
}
}




Thanks,

Pranav

Kinvey

1 Comment

Answer

Hi Wood,


Please check following links for more information on Login with Social Identities:

Service Settings

IdP Settings

MIC Facebook

MIC Authenticate


Also, please check our sample app demonstrating 'Facebook Login with Kinvey' on this link. Following is the code snippet from this link:


User.login(authSource: .facebook, ["access_token" : accessToken.authenticationToken]) { user, error in
if let user = user {
print(user)
self.userLabel.text = "User ID: \(user.userId)"
} else {
print(error ?? "unknow error")
}
}




Thanks,

Pranav

Kinvey

Login or Signup to post a comment