I am attempting to use GitLab as my oauth2 provider in the Social Login app. It fails on the step redirect step after I am successfully directed to GitLab where I log in:
The redirect URI included is not valid.
It displays this error in what appears to be the GitLab user settings page. The URL in the address bar looks like
https://gitlab.com/oauth/authorize?response_type=code&client_id=1cb...b9&redirect_uri=https%3A%2F%2Fcloud.example.com%2Fapps%2Fsociallogin%2Fcustom_oauth2%2Fgitlab&scope=read_user%2Bread_api&state=HA...US8
In the Social Login admin settings, I have the following for the Custom Oauth2 definition:
GitLab
https://gitlab.com/api/v4/
https://gitlab.com/oauth/authorize
https://gitlab.com/oauth/token
https://gitlab.com/oauth/profile
(empty)
[my client id]
[my client secret]
read_user+read_api
(empty)
(empty)
GitLab
In my GitLab application definition (User Settings > Applications) I have the Callback URL as https://cloud.example.com/apps/sociallogin/oauth/
with scopes read_user
and read_api
(these were the scopes required for me to use GitLab in a JupyterHub deployment that is working properly).
Has anyone configured this successfully for use with GitLab and can help me determine why it is failing?