Socialid.login.disconnect
From Social ID Developers
(Difference between revisions)
(→Description) |
Ivan.filho (Talk | contribs) (→Parameters) |
||
Line 14: | Line 14: | ||
! align="left" width="200px" | provider | ! align="left" width="200px" | provider | ||
| width="200px" | required | | width="200px" | required | ||
− | | Determines which provider will be disconnected from the user logged in the current login session. Can be "facebook", "twitter", "linkedin" | + | | Determines which provider will be disconnected from the user logged in the current login session. Can be "facebook", "twitter", "linkedin", "gplus", "instagram" or "apple". |
|+ | |+ | ||
! align="left" width="200px" | handler | ! align="left" width="200px" | handler |
Latest revision as of 20:42, 26 February 2020
Contents |
Description
API to disconnect (remove) a provider from the user logged in the current login session. This API can trigger the following events:
Usage
socialid.login.disconnect(provider, handler)
Parameters
provider | required | Determines which provider will be disconnected from the user logged in the current login session. Can be "facebook", "twitter", "linkedin", "gplus", "instagram" or "apple". | 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 provider was disconnected successfully, or not_found, if there is no user logged in the current login session. |
---|
Example
Disconnects the Twitter credential from the user logged in the current login session:
socialid.login.init(1); var handler = function(response) { if (response.status == "success") { alert("Your Twitter credential was successfully removed!"); } else { alert("It was not possible to remove your Twitter credential"); } } socialid.login.disconnect("twitter", handler);
You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground