File links get redirected to home page

Hi - have just implemented GitLab CE 12.9.4 on Oracle Linux 7.7 and integrated it with our SSO.

When I go to a project and click on a file name, instead of going to the file and seeing the contents/details of the file, I get redirected to the home page.

The link looks correct, i.e.:

https://gitgl401.domain.com/infrastructure/rsync-scripts/-/blob/master/newvm-test01.do_rsync.sh

but I end up at

https://gitgl401.domain.com/

Not sure how to troubleshoot this, any input appreciated.

Thanks.

More data, if it helps:

There’s a setting that I had turned on called omniauth_auto_sign_in_with_provider, which is what directs straight to SSO when you go to the login page instead of the gitlab home page. I turned this back off, so user has the option of signing in with SSO or with local creds.

If I sign in with local creds:
• The first time I click on a file to view, I get redirected to the login page again.
o If I sign in again with local creds, the loading of the file works as expected. And also for all other files I click after that (but I don’t have to go home page and re-authenticate again, it just works).
o If I click on Sign in with SSO, I never get to the file, I always get re-directed to the home page.

I’m not sure why I get re-directed to the authentication page the first time I click on a file regardless of how I’m signed in, but then after that it seems to be handled differently whether you authenticate via SSO or local.