Open
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- This issue affects my Ory Network project.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
apiKey/accessToken does not get added to the request when using the typescript SDK, resulting in admin calls rejecting as unauthorised.
You can work around it if you set the baseOptions to specify the header yourself.
Reproducing the bug
const hydra = new OAuth2Api(new Configuration({
basePath: 'https://slug.projects.oryapis.com/',
apiKey: 'ory_pat_xyz',
}))
hydra.listOAuth2Clients().then(console.log).catch(console.error)
Relevant log output
{
"error": {
"code": 401,
"status": "Unauthorized",
"request": "e5490b83-f7d5-9399-8136-283766c823b4",
"message": "Access credentials are invalid"
}
}
Relevant configuration
No response
Version
"@ory/hydra-client": "^2.0.2"
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response