Login/logoutBefore you start working on documents stored within your cloud, you need to log in to it. Use the execCommand method of the window.AscDesktopEditor object to display the cloud in the Connected clouds list or remove it. AscDesktopEditor.execCommand (command, parameters) Parameters
portal:loginWhen the portal:login command is sent, the cloud is registered and listed on the Connected clouds page. Call the command on all the pages you can access after logging in to your cloud. Parameters are specified in the format of a string with the serialized json as follows: { "displayName": "user name", "email": "user@email.addr", "domain": "domain name", "provider": "provider", "userId": "user id" } Parameters
Example
const params = { "displayName": "John Smith", "email": "john@example.com", "domain": "https://exampledomain.com", "provider": "onlyoffice", "userId": "78e1e841" } AscDesktopEditor.execCommand ("portal:login", JSON.stringify(params)) portal:logoutWhen the portal:logout command is sent, the cloud will be removed from the list on the Connected clouds page. Cookies for this domain will be cleared. Parameters are specified in the format of a string with the serialized json as follows: { "domain": "domain name" } Parameters
Example
window.AscDesktopEditor.execCommand ("portal:logout", JSON.stringify (({ "domain": "https://exampledomain.com" })); |