Reputation: 178
I've read the docs for ORY Kratos and it certainly fits for our requirements for users, however we have third party Apps that also use our APIs.
Which ORY solution should I be using for that part, and how would I use it together with Kratos?
Upvotes: 2
Views: 3332
Reputation: 144
Please let me elaborate Matt Mc's answer:
As per the official documentation here:
https://www.ory.sh/hydra/docs/
Hydra implements the OAuth and OpenID Connect standard without forcing you to use a "Hydra User Management" (login, logout, profile management, registration), a particular template engine, or a predefined front-end. This allows you to implement user management and login your way, in your technology stack, with authentication mechanisms required by your use case (token-based 2FA, SMS 2FA, etc).
This means that we can use any user management system and Kratos is one choice for it.
Hydra becomes in charge of issuing Access tokens, Refresh tokens etc. The third-party apps can register themselves with Hydra and they will be issued a client ID and client secret.
Hydra provides an API for this, however, you have to design the UI by yourself.
More details regarding the API for creating clients can be found here:
https://www.ory.sh/hydra/docs/reference/api/#operation/createOAuth2Client
The quickest way to get acquainted with Hydra is their 5 minute tutorial over here:
https://www.ory.sh/hydra/docs/5min-tutorial
Kratos becomes in charge of actually storing the user credentials and checking the user credentials when they login.
I have created a reference implementation in Go, that integrates Kratos (v0.8.0-alpha.3) and Hydra (v1.10.6).
https://github.com/atreya2011/go-kratos-test/tree/hydra
There is also an official Node.js reference implementation that uses an older version of Kratos/Hydra over here.
https://github.com/ory/kratos-selfservice-ui-node/tree/hydra-integration-2021
You can use both as a starting point to implement an integration in any other language of your choice :)
You can also find other useful community implementations over here:
https://www.ory.sh/docs/ecosystem/community/
Upvotes: 4