Example
var getProvider(): string {
// return the ID of the provider
}
SocialLogin.login(
getProvider(),
(result: SocialLogin.ILoginResult) => {
console.log("provider: " + result.provider);
console.log("code: " + result.code);
console.log("error: " + result.error);
console.log("userToken: " + result.userToken);
console.log("displayName: " + result.displayName);
console.log("photo: " + result.photo);
console.log("authToken: " + result.authToken);
console.log("authCode: " + result.authCode);
}
);
Members
Properties
authCode
Offline auth code used by servers to request new auth tokens.
authToken
Gets the auth token (if requested).
code
The result code.
Value | Description |
---|---|
0 | succeeded |
-2 | failed |
-1 | "unhandled" exception |
1 | cancelled |
displayName
The display name of the user.
error
Error information.
id
The ID of the user used by the provider.
photo
The URL to the photo / avatar.
provider
The ID of the provider
Value |
---|
userToken
The user token (in most cases this is the email address).