Auth broken in spaces but not locally

When I run my app locally, it renders as I’d expect, and I’m able to log in via setting the env variable.

However, when I upload this exact same code to spaces, it looks like this, and I’m unable to log in:

It occurs on both Chrome and Safari.
Has anyone else seen this before? Thanks!