Hi team! Does anyone know if there is a Hydra + Kr...
# talk-hydra
n
Hi team! Does anyone know if there is a Hydra + Kratos implementation example available?
b
Its in Golang
m
Does it still work with the new versions of Hydra & Kratos btw @bulky-architect-22083?
b
@magnificent-energy-493 I am planning to update them soon ๐Ÿ™‡ Is this the right place to look for client code generated in Go? https://github.com/ory/sdk/tree/master/clients
m
Yes for self-hosted it is recommended to use the hydra-client, kratos-client and so on, since they are pinned to a specific version of Kratos etc. The โ€œmainโ€ ory-client containts kratos, hydra, etc. but it is not pinned to a specific version of them, rather following the latest version of Kratos/Hydra run in Ory Network. https://github.com/ory/sdk/tree/master/clients/client So using client in self-hosted envs you might get a version mismatch in some cases; but in essence they are the same client.
b
Roger! So there are two different clients, one for cloud-hosted and another for self-hosted. Thank you for that clarification ๐Ÿ™
m
Exactly. In essence they are the same client, but since cloud-hosted might be โ€œfasterโ€ in the release cycle, better use kratos-client etc. when hosting it yourself.
I think this is also a good example of the integration of Kratos&Hydra now: https://github.com/DrBu7cher/ory-selfservice-ui-node/commit/d085ea54a2486f75dd4830b9a95ab9a70e416c61
b
Understood! ๐Ÿ™‡
I see that there is an official integration between kratos and hydra by setting the kratos configuration. I will update my example accordingly ๐Ÿ™
My apologies for not being able to make that PR to integrate my example with the official
ory/examples
repository... Got busy with work etc ๐Ÿ™‡ I am planning to make that PR soon!
And thank you for that diff! I will use that as a reference to update my example as well ๐Ÿ™‚
m
No need to apologize! Thank you for your work, it has been very helpful for newcomers ๐Ÿ™Œ
n
Thanks @bulky-architect-22083 @silly-state-92756
s
@bulky-architect-22083 or @magnificent-energy-493 Can you point me to
I see that there is an official integration between kratos and hydra by setting the kratos configuration. I will update my example accordingly
? I am struggling to find clear, official example ๐Ÿ™‚
b
@straight-actor-10624 what about this? I am yet to update my example https://github.com/DrBu7cher/ory-selfservice-ui-node/commit/d085ea54a2486f75dd4830b9a95ab9a70e416c61
s
@bulky-architect-22083 that worked with some tweaks. I was hoping for something officially maintained by Ory ๐Ÿ˜…
b
@straight-actor-10624 What kind of tweaks? My implementation does not use the latest version of Kratos and Hydra
n
Wil be nice to see tour implementaron @bulky-architect-22083
b
@narrow-boots-20963 I am planning to update it soon to use the latest versions of Kratos and Hydra. If @straight-actor-10624 has already made those updates to his version, it would be nice if he can make a PR to my repo ๐Ÿ™
m
See the discussion here for some more example code https://github.com/ory/kratos/discussions/2976 Feel free to open an issue/discussion in github.com/ory/examples as well for the self-hosted Kratos/Hydra integration ๐Ÿ™
s
b
@straight-actor-10624 Thanks! But I think there has been a misunderstanding. My repository is this https://github.com/atreya2011/go-kratos-test/tree/hydra-consent ๐Ÿ˜…
s
๐Ÿ˜‚ oops! I have been working off of https://ory-community.slack.com/archives/C012RBW0F18/p1672912172464349?thread_ts=1672846802.125869&cid=C012RBW0F18 and completely looked past there being two different repos in the discussion! Looks like yours actually addresses one of the concerns I had, which is using
toSession
rather than the admin identity endpoint.
b
Haha. Thatโ€™s alright. However mine uses an older version of both Kratos and Hydra. Havenโ€™t found the time to update them. So I assumed you updated them as well. Anyway glad you got it working ๐Ÿ‘
m
Hi @bulky-architect-22083 have you encounter this error? ๐Ÿ™‚ after executing
make generate
node_modules\json-schema-to-typescript\node_modules\@bcherny\json-schema-ref-parser\lib\index.js:2