Django Social account is redirected to gitlab.com instead of gitlab.local

Hello I have installed gitlab locally on my own server. I am trying to make django settings with django social app with the steps specified in the readthedocs readthedocs link to enter through readthedocs gitlab accounts, but for some reason my server connects to gitlab.com when I say connect with gitlab via readthedocs instead of https://gitlab.local. I need to redirect it to my server. How do I do this, the django docs say the following steps but I have no idea how and where to change it.

https://django-allauth.readthedocs.io/en/latest/providers.html#gitlab

GitLab The GitLab provider works by default with https://gitlab.com. It allows you to connect to your private GitLab server and use GitLab as an OAuth2 authentication provider as described in GitLab docs at http://doc.gitlab.com/ce/integration/oauth_provider.html

The following GitLab settings are available, if unset https://gitlab.com will be used, with a read_user scope.

GITLAB_URL:Override endpoint to request an authorization and access token. For your private GitLab server you use: https://your.gitlab.server.tldSCOPE:The read_user scope is required for the login procedure, and is the default. If more access is required, the scope should be set here. which file do I need to modify to make the following setting or what is the way to do it?

Example:

SOCIALACCOUNT_PROVIDERS = { 'gitlab': { 'GITLAB_URL': 'https://your.gitlab.server.tld', 'SCOPE': ['api'], }, }

Thankyou for support.

Back to Top