{"_id":"5759a5475577ba2b00cc430d","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"},"project":"575656e0a71a711700de7eef","user":"57429d54990c970e00386e12","category":{"_id":"5759a5475577ba2b00cc4308","project":"575656e0a71a711700de7eef","__v":0,"version":"5759a5475577ba2b00cc4306","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-09T03:13:43.221Z","from_sync":false,"order":1,"slug":"functions","title":"Functions"},"__v":0,"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-09T05:08:21.255Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"SocialLogin.login(\\n    \\\"facebook\\\",\\n    (result) => {\\n        console.log(\\\"provider: \\\" + result.code);\\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    }\\n);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n## Valid provider values\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"h-1\": \"Provider\",\n    \"0-0\": \"facebook\",\n    \"1-0\": \"google\"\n  },\n  \"cols\": 1,\n  \"rows\": 2\n}\n[/block]","excerpt":"Logs in by using a specific provider.","slug":"login-provider-callback","type":"fn","title":"login"}

login

Logs in by using a specific provider.

[block:code] { "codes": [ { "code": "SocialLogin.login(\n \"facebook\",\n (result) => {\n console.log(\"provider: \" + result.code);\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 }\n);", "language": "javascript" } ] } [/block] ## Valid provider values [block:parameters] { "data": { "h-0": "Value", "h-1": "Provider", "0-0": "facebook", "1-0": "google" }, "cols": 1, "rows": 2 } [/block]