Can't authenticate with oAuth vs GitLab

Hello,

I’m currently using Seafile Pro 7.0.4 on an internal network.
I recently started to provide user authentication via Ouath provided by our internal GitLab-CE. I succeeded setting it up for several other applications (Mediawiki, Wekan, SonarQube…)
So I tried to connect Seafile the same way, but it fails strangely :

In Gitlab I defined the Seafile application entry : with a redirect URI :
https://seafile01.mydomain.fr/oauth/callback/

In conf/seahub_settings.py I defined up my Oauth settings :
OAUTH_REDIRECT_URL = ‘https://seafile01.mydomain.fr/oauth/callback/
OAUTH_PROVIDER_DOMAIN = ‘mydomain.fr
OAUTH_AUTHORIZATION_URL = ‘https://gitlab01.mydomain.fr/gitlab/oauth/authorize
OAUTH_TOKEN_URL = ‘https://gitlab01.mydomain.fr/gitlab/oauth/token
OAUTH_USER_INFO_URL = ‘https://gitlab01.mydomain.fr/gitlab/api/v4/user

I restarted the service
I get the Single Sign-On option on login page
When I click on it, I get to the authorization page in GitLab
When I click Authorized, my browser returns an error accessing https://seafile01.mydomain.froauth/callback/

See : the / between the TLD (.fr) and the path (/auth/callback) has disappeared !

I tried to read the code but I’m not proficient enough in Python to guess what is happening, why this “/” disappears. I tried setting the REDIRECT_URL to .fr//oauth, and several other tricks, but GitLab refuses it.

any clue ?

edit: mydomain wasn’t diplaying

Yeah, it’s very strange.

Can you send your complete seahub_settings.py and nginx(or apache) configuration here?

Hi

thank for your answer, you pointed me on the way to solve this particular issue :
I use the docker image
my seahub_settings and nginx configurations inside the container are OK
BUT
there was a typo in the rewrite directive of the Apache frontend outside the container (a missing trailing / ) I was provided with.

Now after Gitlab authentication I return to the callback address. But it fails, I guess because of self signed certificates.
I’m going to investigate this.

Thanks for your answer and sorry for wasting your time.