Mattermost Peer-to-Peer Forum

Config.json settings


#1

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


#2

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..


#3

Thanks @amy.blais - this is actually for the Windows desktop application.
Is there any way to have the setting below enabled by default?


#4

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).


#5

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