OpenID-connect infinite redirect when using signup button

Hi, I followed along with the great guide to using Auth0 with express. Then I duplicated the process in my own app. All was working well on my local machine. But now I have deployed to Heroku, and the signup button is leading to an infinite redirect loop after signing in.

Here is the url that shows in the browser:

Here is the code for the sign-up route in my app:

app.get('/sign-up/', (req, res) => {
    authorizationParams: {
      screen_hint: 'signup'

Any idea what’s causing the problem?