GitLab SSO: The redirect URI included is not valid

Summary
The error “The redirect URI included is not valid.” when logging in to Mattermost with GitLab

Steps to reproduce
I’m using the latest version of Mattermost [Free version] and the official www.gitlab.com. So no self hosted gitlab or something.

Expected behavior
Logging in to Mattermost with GitLab

Observed behavior
I’m getting the error The redirect URI included is not valid. The uri’s are:
http://localhost:8065/login/gitlab/complete
http://localhost:8065/login/gitlab/complete

Also tried it with a deployment in AWS but got the same result…

Checked the link GitLab Single Sign-On — Mattermost documentation
I noticed the sentence at Step 1 - 2C: Do not select any options under Scopes.. Unfortunately this is not possible since it is required to select at least one option.