auth-js icon indicating copy to clipboard operation
auth-js copied to clipboard

Feature Request - New Ory Hydra OAuth2 Provider Integration

Open koakh opened this issue 3 years ago • 8 comments

Feature request

I want a new Ory Hydra OAuth2 Provider Integration

Describe the solution you'd like

Waiting for someone/team/community integrate Ory Hydra OAuth2 Provider

Describe alternatives you've considered

The alternative is integrate it, and contribute with PR of the Integration with some info how to setup and a online demo of everything working, and a deployed OryHydra server if supabase members wants to test integration without deploy it

Additional context

This same feature request will be in repos supabase-js and supabase gotrue repos

koakh avatar Jul 16 '22 21:07 koakh

I want a new Ory Hydra OAuth2 Provider Integration

Hm, what's the motivation? What does Ory Hydra offers that Gotrue doesn't?

steve-chavez avatar Jul 16 '22 22:07 steve-chavez

OryHydra is a OAuth2 open source provider like Keycloak, GitHub, Google etc

it is not a replacement for gotrue, but another oauth2 provider

from ory hydra intro page

Hydra is an OAuth 2.0 and OpenID Connect Provider. In other words, an implementation of the OAuth 2.0 Authorization Framework as well as the OpenID Connect Core 1.0 framework. As such, it issues OAuth 2.0 Access, Refresh, and ID Tokens that enable third-parties to access your APIs in the name of your users.

⁣Koakh

On Jul 16, 2022, 23:17, at 23:17, Steve Chavez @.***> wrote:

I want a new Ory Hydra OAuth2 Provider Integration

Hm, what's the motivation? What does Ory Hydra offers that Gotrue doesn't?

-- Reply to this email directly or view it on GitHub: https://github.com/supabase/gotrue-js/issues/316 You are receiving this because you authored the thread.

Message ID: @.***>

koakh avatar Jul 16 '22 23:07 koakh

In cases where one use OryHydra OAuth2 Authentication and like to use supabase with it, makes a lot of sense (IMO), is very similar to the use case of keycloak, same principle

In my case I'm working with both keycloak and ory hydra, and start to play with supabase a few days a go, and think that is a good idea to integrate hydra provider in supabase, I integrate it and it's working, why not contribute it?

for me it's a way to learn supabase oauth providers, not the basic ones like github etc, but the self hosted ones that seems must harder, like keycloak that have some unsolved issued on how to setup it the right way, and with some debug and patient it's working (hosted and self hosted)

Thanks

Koakh

On Jul 16, 2022, 23:17, at 23:17, Steve Chavez @.***> wrote:

I want a new Ory Hydra OAuth2 Provider Integration

Hm, what's the motivation? What does Ory Hydra offers that Gotrue doesn't?

-- Reply to this email directly or view it on GitHub: https://github.com/supabase/gotrue-js/issues/316 You are receiving this because you authored the thread.

Message ID: @.***>

koakh avatar Jul 16 '22 23:07 koakh

@koakh moving this to the auth component of supabase-js 🙏

soedirgo avatar Jul 18 '22 05:07 soedirgo

@koakh Some examples are being worked on here: https://github.com/supabase/supabase/discussions/7758

steve-chavez avatar Jul 18 '22 17:07 steve-chavez

Hello

this examples https://github.com/supabase/supabase/discussions/7758 are about ory kratos and oathkeeper, Maybe I'm making some confusion, I don't have time to check projects yet

But glad to know that ory created two examples with supabase, sure I will check it later :)

But I'm talking here is about ory hydra, not kratos or oathkeeper, Hydra is another ory project, and the oryhydra provider is just another oauth2 provider on top of gotrue

I admit my english is not good enough but I'm trying hard to explain the purpose and motivation, maybe a demo with everything working makes more sense

NextJs > Auth (GoTrue+OryHydraProvider) > NextJs (With access Granted)

I already integrate ory hydra as a new gotrue provider a few days later, and create the issues to submit the PR

Now I m waiting to PR, nothing more, if is useful for supabase project, and think that is the point where we are

for my own projects I have it working but I really want to contribute this integratiion to this two awesome projects Supabase and Ory Hydra :)

Thanks for support

koakh avatar Jul 18 '22 18:07 koakh

Hello @koakh That is correct the current examples are using Kratos to manage identities and Oathkeeper as as identity and access proxy.

We also have some examples upcoming that involve Hydra, and would love to feature an integration with supabase in our docs & example repo as well 👍 feel free to reach out to me.

vinckr avatar Jul 19 '22 10:07 vinckr

Hello @vinckr

Glad to know you have interest in supa and hydra integration to, but to use supabase with oryhydra provider I must PR it, and they must deploy a new version of hosted supabase

The other way we can work is using the docker images that I made, but this only work with supabase self hosted, its what i'm using right now

Why: because hosted supabase dont have ory provider and without it we can't use hosted version

Maybe this will take some time, to code review, docs, tests etc

But I will ping you in slack, until supa budies respond to PR And sure we can continue in ory hydra side...

thanks

koakh avatar Jul 19 '22 18:07 koakh

Hey everyone, we'll be closing this issue since we've added it to the megathread. Thanks for the suggestion!

kangmingtay avatar Sep 30 '22 04:09 kangmingtay