Closed bulolo closed 1 year ago
@aeneasr any diffrent between @ory/client and @ory/hydra-client@v2.0.2?
@aeneasr any diffrent between @ory/client and @ory/hydra-client@v2.0.2?
For future reference: When self-hosting it is recommended to use the dedicated client (hydra-client in this case). When using Ory Network you use @ory/client
Functionally they are the same and work interchangeably, both built from ory/sdk, but Ory Network might have features that are not yet released in hydra-client.
If anyone stumbles into the same issue, use OAuth2Api instead:
import { Configuration, OAuth2Api } from "@ory/hydra-client";
export const publicApi = new OAuth2Api(
new Configuration({
basePath: "HYDRA_PUBLIC_URL",
})
);
export const adminApi = new OAuth2Api(
new Configuration({
basePath: "HYDRA_ADMIN_URL",
})
);
Preflight checklist
Describe the bug
can't find
PublicApi
AdminApi
Reproducing the bug
Relevant log output
No response
Relevant configuration
No response
Version
2.0.2
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Docker
Additional Context
No response