On first run of mattermost app, Is it possible to define auto login from the config.json.
Also can we run mattermost with a different config location/file.
Regards.
K
On first run of mattermost app, Is it possible to define auto login from the config.json.
Also can we run mattermost with a different config location/file.
Regards.
K
Hi @kevin.byrne,
For auto-login: There are two cookies that need to be set to login without a password and username. Here’s an example of how to set them:
setcookie('MMUSERID', '<user id from database>', time()+606024*30, ‘/’, ‘.yourdomain.com’, true, true);
setcookie('MMAUTHTOKEN', '<Authentication Token Value>', time()+606024*30, ‘/’, ‘.yourdomain.com’, true, true);
Replace <user id from database>
and <Authentication Token Value>
with their respective values for that user. You can get both of these values with a database query, or by using the authentication instructions for the Mattermost API..
Thanks @amy.blais - this is actually for the Windows desktop application.
Is there any way to have the setting below enabled by default?
Hi @kevin.byrne,
Currently that setting is disabled by default: https://docs.mattermost.com/help/apps/desktop-guide.html?highlight=desktop#app-options.
To have it enabled by default, you can open a feature request ticket in the desktop app repo (https://github.com/mattermost/desktop/issues).
Hi @kevin.byrne
You can depoly a registry key with GPO Preferences to set this as default.
The key is within HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run