Auth0 Authentication Looping in Production Not Locally

Continuing the discussion from Implementing Auth0 Protected Routes using React Router v6…?:

Hi @dan-auth0 . I used your guide above to implement Auth0 integration into my App which uses React 18 but with React Router 5. Currently, after logging into the App via Auth0 login screen a continuous loop occurs between Auth0 and my App in Production but works fine in Dev with localhost. Just wondering what might be causing this considering I followed your guide quite closely. Only I have React 18 with RR 5, where your guide has React 17 with RR 5. I don’t think this should causes the looping should it? Also, considering it works in Dev. Any suggestions?

Wow. Spent many days trying to resolve this issue. I was able to fix the above stated issue by finding and applying fix described here: