Why is the documentation really bad for providing ...
# talk-hydra
c
Why is the documentation really bad for providing examples? It's difficult to decipher how to achieve something due to the lack of examples in the documentation. I'm going to ask a simple question here relating to https://www.ory.sh/machine-to-machine-auth/. Let's say I have a platform/API that I want to create machine-to-machine clients for, these can be 3rd party or 1st party applications. How do I go about creating a client that can then be authenticated with my platform? Some more context: I'm using NestJS backend with PassportJS. I want to be able to create clients that can access my platform and make API calls etc... however I have no idea where to start with any of this? I can't seem to find any documentation around this, I've asked questions before relating to Kratos and although I believe I have a firmer grasp on Kratos now, it feels like I'm back to square one because of the lack of docs. Maybe I'm not looking in the right place, but this is clearly an issue. When is this going to be resolved?
c
Hello friend. It is true that documentation could have been better organized and have everything in one place for better browsing. For your use case, you have two options: 1. Use the hydra API to make HTTP calls in order to register new clients. You can see the API documentation here. 2. You can use ory hydra client library which is compatible with javascript/typescript. Unfortunately, there are not many examples written in javascript/typescript. What you can do is have a look at the python examples and then try to achieve the same result with the typescript client. It shouldn't be very different in terms of functions etc. The client has support for both admin and public calls, so you can use it on both sides. It can be a bit "weird" to setup but it does really work. This is what I am using at the moment.
m
Hey @creamy-fall-97349, We are currently working on making the docs, especially for Ory Hydra use cases more comprehensive and feedback like this really helps, thanks! See also this document https://www.ory.sh/docs/hydra/guides/oauth2-clients which gives some examples how to create clients. Feel free to open an issue related to an Ory Network project here. Also check the docs in the coming weeks, lots of improvements planned.
f
I think part of the issue is that doc references using a hydra command to create clients, which is great. But it would also be beneficial to have curl examples to see how to do it from an external source