7

I have a project that needs to implement Oauth2 (users need to be able to login with Google or iCloud), and I decided to use ORY hydra so I don't have to write my own Oauth2 implementation.

I tried figuring ORY Hydra out on my own, but I failed. I know how Oauth2 works in abstract terms, but I have no idea how to implement Oauth2 with it in practice. SDKs have no documentation, no matter what language they are for. I know that Hydra has an HTTP API, so language SDKs don't really matter, but I was hoping to find some guidance in their documentation; as I wrote, they have none. And the main documentation's "5 minute tutorial" just provides some docker containers without any code or logic behind them, just some docker-compose commands.

What is a good educational resouce that would show how to implement Oauth2 with ORY Hydra? At this point I am ready to use any language at all, or dive straight into the Oauth2 standard.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
selamba
  • 384
  • 4
  • 12

2 Answers2

6

You need Ory Hydra if you want to become a OAuth2 provider yourself. What you are looking for is Ory Kratos, a user management system. You can also implement "Login with..." for multiple providers.

Check out this article for more info if you need OAuth2:

The "5 minute tutorial" does not really touch any underlying concepts, but there are multiple links to the docs that explain this. Here is a good starting point: https://www.ory.sh/hydra/docs/concepts/oauth2

vinckr
  • 150
  • 8
2

For "social sign-in" you probably need Kratos: https://www.ory.sh/kratos/docs/concepts/credentials/openid-connect-oidc-oauth2/

Seweryn Niemiec
  • 1,123
  • 2
  • 13
  • 19
  • 1
    Is there a way to properly integration Kratos and Hydra together? We need to be a OAuth2 provider just so that our customers can have API tokens, but I need Hydra to use the identities that are stored inside Kratos. – CMCDragonkai Jun 02 '21 at 08:11
  • @CMCDragonkai Yes this can be done and I have elaborated on it over here if you are interested :) https://stackoverflow.com/a/70062274/10572894 – Atreya Sridhar Nov 23 '21 at 13:46