{"_id":"5759a5475577ba2b00cc4312","parentDoc":null,"version":{"_id":"5759a5475577ba2b00cc4306","project":"575656e0a71a711700de7eef","__v":1,"createdAt":"2016-06-09T17:20:07.619Z","releaseDate":"2016-06-09T17:20:07.619Z","categories":["5759a5475577ba2b00cc4307","5759a5475577ba2b00cc4308","5759a5475577ba2b00cc4309"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.3.1","version":"1.3.1"},"__v":2,"githubsync":"","user":"57429d54990c970e00386e12","category":{"_id":"5759a5475577ba2b00cc4309","version":"5759a5475577ba2b00cc4306","__v":0,"project":"575656e0a71a711700de7eef","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-09T05:11:07.146Z","from_sync":false,"order":2,"slug":"classes-and-interfaces","title":"Classes and interfaces"},"project":"575656e0a71a711700de7eef","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-09T05:18:05.335Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"## Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var getProvider(): string {\\n    // return the ID of the provider\\n}\\n\\nSocialLogin.login(\\n    getProvider(),\\n\\n    (result: SocialLogin.ILoginResult) => {\\n        console.log(\\\"provider: \\\" + result.provider);\\n        console.log(\\\"code: \\\" + result.code);\\n        console.log(\\\"error: \\\" + result.error);\\n        console.log(\\\"userToken: \\\" + result.userToken);\\n        console.log(\\\"displayName: \\\" + result.displayName);\\n        console.log(\\\"photo: \\\" + result.photo);\\n        console.log(\\\"authToken: \\\" + result.authToken);\\n        console.log(\\\"authCode: \\\" + result.authCode);\\n    }\\n);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n## Members\n\n### Properties\n\n#### authCode\n\nOffline auth code used by servers to request new auth tokens.\n\n#### authToken\n\nGets the auth token (if requested).\n\n### code\n\nThe result code.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"0\",\n    \"0-1\": \"succeeded\",\n    \"1-0\": \"-2\",\n    \"1-1\": \"failed\",\n    \"2-1\": \"\\\"unhandled\\\" exception\",\n    \"2-0\": \"-1\",\n    \"3-0\": \"1\",\n    \"3-1\": \"cancelled\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n#### displayName\n\nThe display name of the user.\n\n#### error\n\nError information.\n\n#### id\n\nThe ID of the user used by the provider.\n\n#### photo\n\nThe URL to the photo / avatar.\n\n#### provider\n\nThe ID of the provider\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"facebook\",\n    \"1-0\": \"google\",\n    \"h-0\": \"Value\"\n  },\n  \"cols\": 1,\n  \"rows\": 2\n}\n[/block]\n#### userToken\n\nThe user token (in most cases this is the email address).","excerpt":"","slug":"iloginresult","type":"basic","title":"ILoginResult"}
## Example [block:code] { "codes": [ { "code": "var getProvider(): string {\n // return the ID of the provider\n}\n\nSocialLogin.login(\n getProvider(),\n\n (result: SocialLogin.ILoginResult) => {\n console.log(\"provider: \" + result.provider);\n console.log(\"code: \" + result.code);\n console.log(\"error: \" + result.error);\n console.log(\"userToken: \" + result.userToken);\n console.log(\"displayName: \" + result.displayName);\n console.log(\"photo: \" + result.photo);\n console.log(\"authToken: \" + result.authToken);\n console.log(\"authCode: \" + result.authCode);\n }\n);", "language": "javascript" } ] } [/block] ## 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. [block:parameters] { "data": { "h-0": "Value", "h-1": "Description", "0-0": "0", "0-1": "succeeded", "1-0": "-2", "1-1": "failed", "2-1": "\"unhandled\" exception", "2-0": "-1", "3-0": "1", "3-1": "cancelled" }, "cols": 2, "rows": 4 } [/block] #### 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 [block:parameters] { "data": { "0-0": "facebook", "1-0": "google", "h-0": "Value" }, "cols": 1, "rows": 2 } [/block] #### userToken The user token (in most cases this is the email address).