OIDC authentication fails on server but works locally

Hi,

We’re trying to add Okta authentication to a React SPA. This flow works for us locally, but does not when the application is deployed. When deployed, the application gets stuck on the /login/callback/ route and does not successfully redirect to the main route. We have configured the redirect URI and trusted origins to match both localhost and the target domain, and running the oktaAuth client in dev mode, we see the following authState output when deployed:

Current authState {accessToken: undefined, idToken: undefined, refreshToken: undefined, isPending: false, isAuthenticated: false}

Whereas when we run it locally, we see this:

Current authState {accessToken: {…}, idToken: {…}, refreshToken: undefined, isAuthenticated: true}

Are we missing some other configuration setting?