Socialid.login.logout

From Social ID Developers
Revision as of 12:08, 4 November 2014 by Renato.neves (Talk | contribs)
Jump to: navigation, search

Contents

Description

API to logout the user (destroy the current login session).

Usage

 socialid.login.logout(handler)

Parameters

handler optional Callback function to handle the API response.

API Response

data Always "null". This API does not return data.
status The API response status. Can be success, if the user has been logged out successfully, or not_found, if there is no user logged in the current login session.

Example

Logout the user from the current login session:

 socialid.login.init(1);
 var handler = function(response) {
    if (response.status == "success") {
       alert("You have been logged out successfully!");
    } else {
       alert("Could not log out.");
    }
 }
 socialid.login.logout(handler);

You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox