503 error GitLab Pages access control

Summary

503 error encountered in browser when using access control on GitLab Pages. Initial navigation to the Pages URL redirects to the sign in page. After signing in, a 503 error is encountered. If Pages visibility is set to everyone, site loads.

Steps to reproduce

Example Project

What is the current bug behavior?

With Pages access control enabled, and Pages set to a visibility of Only project members, the Pages site does not load and a 503 is shown instead.

What is the expected correct behavior?

After login, redirect to the Pages site showing correct content.

Relevant logs and/or screenshots

{"host":"pages.example.com","level":"debug","msg":"Authenticate request","path":"/group/project","state":"","time":"2020-07-09T00:22:45Z"}
{"host":"pages.example.com","level":"error","msg":"Authentication is not configured","path":"/group/project","state":"","time":"2020-07-09T00:22:45Z"}

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)