Auth Functions
Get Login Status
This function returns user data without showing a menu. If the user is not logged in, it will return null. If the user is logged in but not connected to the application, it will return not_linked. Otherwise, it will return an authResponse the same as login() or register() will. The second argument can be used to skip the cache.
ID.getLoginStatus(function(response){
console.log(response);
}, false)
Login
ID.login(function(response){
console.log(response);
})
Register
ID.register(function(response) {
console.log(response);
})
Example Auth Response
{
authResponse: {
access_token: "249bf6efac2372a4e9e35d5e1d9f250675bfde70760b6566893ba194937353c9"
details: {
avatars: {
large_secure_url: null,
medium_secure_url: null,
thumb_secure_url: null,
},
email: "user@example.com"
first_name: "Yoda"
},
expires_in: 21600
redirect_uri: "http://example.com/callback#access_token=249bf6efac2372a4e9e35d5e1d9f250675bfde70760b6566893ba194937353c9&expires_in=21600&token_type=bearer"
scope: ""
state: null
token_type: "bearer"
},
status: 'ok'
}