The reference figure and the steps below explain the process of setting a name to an anonymous user in ONLYOFFICE Docs.
The anonymous user uses the document manager to open a document for viewing or editing.
If the user name is not specified, it will be requested. The request can be turned off with the "request"=false value of the editorConfig.customization.anonymous parameter.
After the anonymous user’s name is set, the postfix is added to it via the label field of the editorConfig.customization.anonymous parameter to distinguish guests during the coediting session. By default this postfix is "Guest".
var docEditor = new DocsAPI.DocEditor("placeholder", { "editorConfig": { "customization": { "anonymous": { "request": true, "label": "Guest" }, ... }, ... }, ... });
To restrict anonymous users access to the editor or live viewer, set the services.CoAuthoring.server.isAnonymousSupport parameter in the configuration file to false. In this case, when the anonymous user tries to open the editor, a warning will occur.
The live viewer will switch to the offline viewer without warnings.