Move auth.wolfery.com into the same domain as origin, (e.g. https://wolfery.com/auth)
Instead of a CORS request, use a redirect, which then redirects back.
We are currently doing 1), so that is why it is working now. But to prepare for multi-realm support, I want the authentication server to be separated from the realm.
And I wish to avoid 2) because of vanity; it feels nicer/smoother if the webapp doesn’t bounce between sites.
I’m not the best web developer, and I know very little about CORS other then how to enable it. But what if api.wolfery.com proxied the requests to auth.wolfery.com on behalf of the user (is that bad practice?) so that instead of moving auth to the same domain as the origin, it’s completely hidden from it behind the api layer.
And I know that while you’re wanting to avoid redirects, a lot of sites still do that. So while it wouldn’t be the most graceful, it’s a viable plan B for when auth needs to be seperated from the main domain.