Hi all. Still loving the ory suite. My team and I ...
# ory-selfhosting
s
Hi all. Still loving the ory suite. My team and I are decoupling our front-end and api. Amazing, there's docs for this use case! But for the life of me, I have not figured out what goes wrong using
ory proxy
. There's a simple configuration in the front-end:
Copy code
import {Configuration,  OAuth2Api,  IdentityApi,  FrontendApi} from "@ory/client";

const config = new Configuration({
  basePath: `<http://localhost:4000>`,
  baseOptions: {
    withCredentials: true,
    timeout: 30000, // 30 seconds
  },
});

export default {
  identity: new IdentityApi(config),
  frontend: new FrontendApi(config),
  oauth2: new OAuth2Api(config),
};
And a simple proxy setup in the
package.json
Copy code
"proxy": "ory proxy --dev --no-jwt --port 4000 --project ory.ory.example.com <http://localhost:3002/>"
The
<http://ory.ory.example.com|ory.ory.example.com>
is the url kratos is running on through the
/etc/hosts
. When navigating to http://ory.ory.example.com/.ory/kratos/public/self-service/login/browser, I get redirected to http://localhost:3000/login?flow=1c524c0f-45b9-4c97-aa7a-43a04810c407 Always get a 404. Crazy! Any obvious oversights I might be having?