Login & User Javascript APIs
(Difference between revisions)
Renato.neves (Talk | contribs) (→APIs) |
Renato.neves (Talk | contribs) |
||
Line 6: | Line 6: | ||
|- | |- | ||
| [[socialid.login.init]] | | [[socialid.login.init]] | ||
− | | | + | | Initializes the API to be used by a Social Login application. |
|- | |- | ||
| [[socialid.login.renderLoginWidget]] | | [[socialid.login.renderLoginWidget]] | ||
− | | | + | | Renders the Social Login widget within a DOM element. |
|- | |- | ||
| [[socialid.login.renderConnectWidget]] | | [[socialid.login.renderConnectWidget]] | ||
− | | | + | | Renders the Social Connect widget within a DOM element. |
|- | |- | ||
| [[socialid.login.startLogin]] | | [[socialid.login.startLogin]] | ||
− | | | + | | Starts the social login flow for the given social network. It could open a popup dialog or redirect to the social network, depending on the loginType. |
|- | |- | ||
| [[socialid.login.startConnect]] | | [[socialid.login.startConnect]] | ||
− | | | + | | Opens the popup dialog to connect a new social network credentials in the current login session. |
|- | |- | ||
| [[socialid.login.startLoginClick]] | | [[socialid.login.startLoginClick]] | ||
− | | | + | | Starts the social login flow for the given social network when the user clicks on a DOM element. |
|- | |- | ||
| [[socialid.login.startConnectClick]] | | [[socialid.login.startConnectClick]] | ||
− | | | + | | Opens the popup dialog to connect a new social network credentials in the current login session when the user clicks on a DOM element. |
|- | |- | ||
| [[socialid.login.disconnect]] | | [[socialid.login.disconnect]] | ||
− | | | + | | API to disconnect a social network provider from the current login session. |
|- | |- | ||
| [[socialid.login.logout]] | | [[socialid.login.logout]] | ||
− | | | + | | API to logout the user (destroy the current login session). |
|- | |- | ||
| [[socialid.login.logoutWithFacebook]] | | [[socialid.login.logoutWithFacebook]] | ||
− | | | + | | API to logout the user previously logged in by the Facebook Automatic Login. |
|- | |- | ||
| [[socialid.login.getUserInfo]] | | [[socialid.login.getUserInfo]] | ||
− | | | + | | API to get basic information about the user logged in the current login session. |
|- | |- | ||
| [[socialid.login.loginConnection]] | | [[socialid.login.loginConnection]] | ||
− | | | + | | API to automatically log an user given its connection_id. |
|- | |- | ||
| [[socialid.login.loginUserToken]] | | [[socialid.login.loginUserToken]] | ||
− | | | + | | API to automatically log an user given its user_token. |
|- | |- | ||
| [[socialid.login.loginCredentials]] | | [[socialid.login.loginCredentials]] | ||
− | | | + | | API to automatically log an user given its social networks credentials. |
|- | |- | ||
| [[socialid.login.moveTo]] | | [[socialid.login.moveTo]] | ||
− | | | + | | API to move data from the user logged in the current login session to another user and then removes it. |
|- | |- | ||
| [[socialid.login.automaticFacebookLogin]] | | [[socialid.login.automaticFacebookLogin]] | ||
− | | | + | | Automatically logs an user using the Facebook Javascript SDK. |
|} | |} | ||
Revision as of 15:57, 3 November 2014
APIs
Resource | Description |
---|---|
socialid.login.init | Initializes the API to be used by a Social Login application. |
socialid.login.renderLoginWidget | Renders the Social Login widget within a DOM element. |
socialid.login.renderConnectWidget | Renders the Social Connect widget within a DOM element. |
socialid.login.startLogin | Starts the social login flow for the given social network. It could open a popup dialog or redirect to the social network, depending on the loginType. |
socialid.login.startConnect | Opens the popup dialog to connect a new social network credentials in the current login session. |
socialid.login.startLoginClick | Starts the social login flow for the given social network when the user clicks on a DOM element. |
socialid.login.startConnectClick | Opens the popup dialog to connect a new social network credentials in the current login session when the user clicks on a DOM element. |
socialid.login.disconnect | API to disconnect a social network provider from the current login session. |
socialid.login.logout | API to logout the user (destroy the current login session). |
socialid.login.logoutWithFacebook | API to logout the user previously logged in by the Facebook Automatic Login. |
socialid.login.getUserInfo | API to get basic information about the user logged in the current login session. |
socialid.login.loginConnection | API to automatically log an user given its connection_id. |
socialid.login.loginUserToken | API to automatically log an user given its user_token. |
socialid.login.loginCredentials | API to automatically log an user given its social networks credentials. |
socialid.login.moveTo | API to move data from the user logged in the current login session to another user and then removes it. |
socialid.login.automaticFacebookLogin | Automatically logs an user using the Facebook Javascript SDK. |
Events
Event | Description |
---|---|
socialid.events.onLoginSuccess | Executado quando o usuário finaliza o processo de login com sucesso. |
socialid.events.onLoginCancel | Executado quando o usuário cancela o processo de login (não autoriza o login social). |
socialid.events.onLoginError | Executado quando algum erro acontece durante o processo de login. |
socialid.events.onLoginStart | Executado quando o usuário inicia o processo de login. |
socialid.events.onConnectSuccess | Executado quando o usuário finaliza o processo de conexão de uma nova credencial com sucesso. |
socialid.events.onConnectCancel | Executado quando o usuário cancela o processo de conexão de uma nova credencial (não autoriza o login social). |
socialid.events.onConnectError | Executado quando algum erro acontece durante o processo de conexão de uma nova credencial. |
socialid.events.onConnectStart | Executado quando o usuário inicia o processo de conexão de uma nova credencial. |
socialid.events.onDisconnectSuccess | Executado quando o usuário desconecta alguma de suas credenciais com sucesso. |
socialid.events.onDisconnectError | Executado quando algum erro acontece durante o processo de desconexão de uma credencial. |
Exemplos
- Exemplo de código completo para o Social Login
- Exemplo de código completo para o Social Connect
- Aplicação de exemplo: https://sid-examples.herokuapp.com/social_logins
- Playground da API Javascript do Social Login: https://sid-examples.herokuapp.com/social_logins/playground