4 ms·
The whole local development is still a big mess. I recently starting using http://subdomain.localhost http://subdomain.localhost to keep different projects ap
by oezi 2y ago
The whole local development is still a big mess. I recently starting using
http://subdomain.localhost http://subdomain.localhost
to keep different projects apart during development only to realize that you can't make that work with OAuth, because you can't use http://subdomain.localhost http://subdomain.localhost as a Oauth callback host. But you also can't share cookies between subdomain.localhost and localhost to redirect back without losing the session.
- cyanawesome 2y agoNothing stopping you from redirecting a code response redirect from the authorization server. Have a shim server return 302 from `http://localhost/subdomain/oauth?code= http://localhost/subdomain/oauth?code=...` to `http://subdomain.localhost/oauth?code= http://subdomain.localhost/oauth?code=...` for example.
- oezi 2y agoNeed to try this.
- terminalbraid 2y agoI don't think there's an oauth requirement where those don't work and your issue is more likely to be with the provider itself and restrictions they make on http or local domains. I'd either run an nginx proxy to get around http or choose some domains that don't conflict with their local restrictions. You can add whatever domain you want to a hosts file that resolves to your local IP. I leverage this a lot. Any competent provider should give you some method for local testing and you should work with them given the provider you've chosen.
- oezi 2y agoAzure/Microsoft certainly do not support anything but http://localhost/ http://localhost/...