Note: The Mattermost setup portion of this document is just a quick guide. See the official documentation for more details.
This guide uses the mattermost auth module for Mattermost version 5.0 and above.
Sign-in with an administrator account to your Mattermost instance.
Make sure OAuth 2.0 Service Provider is enabled in the Main Menu (menu button next to your username in the top left corner) –> System Console –> Custom Integrations menu, which you can find at https://your.mattermost.domain/admin_console/integrations/custom
.
Navigate to the OAuth integration settings through Main Menu –> Integrations –> OAuth 2.0 Applications, at https://your.mattermost.domain/yourteam/integrations/oauth2-apps
.
Click on the Add OAuth 2.0 Application button to add a new OAuth application.
Fill out the form and click Save.
Note: The callback URL is \your-codimd-url>/auth/oauth2/callback
After saving the application, you'll receive the Client ID and Client Secret.
Add the Client ID and Client Secret to environment variables:
​​​​​​CMD_MATTERMOST_BASEURL=https://your.mattermost.domain
​​​​​​CMD_MATTERMOST_CLIENTID=ii4p1u3jz7dXXXXXXXXXXXXXXX
​​​​​​CMD_MATTERMOST_CLIENTSECRET=mqzzx6fydbXXXXXXXXXXXXXXXX
CodiMD
Docs