Signing-in into Mattermost through GitLab doesn't work if Mattermost is behind a reverse proxy and this proxy communicates with HTTP with Mattermost while the user is facing the page with HTTPS (because the proxy support SSL).
1. Run Mattermost behind a reverse proxy,
2. let the proxy communicate with Mattermost via HTTP,
3. configure the proxy to support HTTPS for the user,
4. enable SSO with GitLab,
5. finally: try to log-in
After clicking the SSO button on Mattermost, it will redirect me to GitLab where I have to login-in and authorize the Application to use my account data. After authorizing GitLab should redirect me to Mattermost where I'm logged in now.
After clicking the SSO button GitLab will fail (with the error message: The redirect URI included is not valid.) due to the fact, that the redirect_uri query param doesn't match the provided client_id.