Skip to content

Keycloak OAuth Provider#371

Merged
kangmingtay merged 6 commits intosupabase:masterfrom
fspijkerman:feature/keycloak-provider
Mar 8, 2022
Merged

Keycloak OAuth Provider#371
kangmingtay merged 6 commits intosupabase:masterfrom
fspijkerman:feature/keycloak-provider

Conversation

@fspijkerman
Copy link
Contributor

What kind of change does this PR introduce?

This adds a new OAuth Provider

What is the current behavior?

No support for Keycloak OAuth

What is the new behavior?

Support for Keycloak using OAuth

@fspijkerman fspijkerman force-pushed the feature/keycloak-provider branch from 35fb34e to baa85c5 Compare February 3, 2022 16:16
@J0
Copy link
Contributor

J0 commented Feb 4, 2022

Hey @fspijkerman,

Thanks for the PR! We will review it shortly.

Could we trouble you to add documentation on how to use the provider as well?

Links

Documentation repo: https://github.com/supabase/supabase/tree/master/web/docs/guides/auth

Example of provider documentation: https://supabase.com/docs/guides/auth/auth-google

Feel free to let us know if you need any help with this!

@fspijkerman
Copy link
Contributor Author

Hey @fspijkerman,

Thanks for the PR! We will review it shortly.

Could we trouble you to add documentation on how to use the provider as well?

Links

Documentation repo: https://github.com/supabase/supabase/tree/master/web/docs/guides/auth

Example of provider documentation: https://supabase.com/docs/guides/auth/auth-google

Feel free to let us know if you need any help with this!

No problem, I will also update gotrue-js.

@J0
Copy link
Contributor

J0 commented Feb 6, 2022

Ok, thanks! No rush, let us know whenever ready :)

Copy link

@ismael-iskauskas ismael-iskauskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine. Compared it with other Oauth Providers

@fspijkerman
Copy link
Contributor Author

Meanwhile I have been working on the documentation, but in order to finish a full example (like other providers) it also requires some changes in gotrue-js (already prepared). Will make a PR for this too.

Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fspijkerman, thanks for the PR! I'm not too familiar with how keycloak works but based on the documentation it seems like a single application can have multiple realms to manage different groups of users.

I would expect the ext.URL to include the /realms/{realm-name}/, does this mean that "Sign-in with keycloak" on gotrue would be limited to a single realm?

@fspijkerman
Copy link
Contributor Author

Hey @fspijkerman, thanks for the PR! I'm not too familiar with how keycloak works but based on the documentation it seems like a single application can have multiple realms to manage different groups of users.

I would expect the ext.URL to include the /realms/{realm-name}/, does this mean that "Sign-in with keycloak" on gotrue would be limited to a single realm?

Yes thats correct (and normal), keycloak is multitenant via its Realms. In most cases only 1 realm is used per application, per realm is possible to have multiple applications.

@fspijkerman fspijkerman requested a review from kangmingtay March 2, 2022 15:29
@kangmingtay
Copy link
Member

Hey @fspijkerman, thanks for making the changes, i want to merge this in but i would like to test out your changes with keycloak running locally first. Do you have a guide that I can follow for obtaining the client_id and client_secret in keycloak? We would want to have some documentation around setting this up as well (similar to the rest of the providers)

@kangmingtay kangmingtay merged commit 6de5ec1 into supabase:master Mar 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

🎉 This PR is included in version 2.6.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
cemalkilic pushed a commit that referenced this pull request Aug 7, 2025
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
xeladotbe pushed a commit to xeladotbe/supabase-auth that referenced this pull request Sep 27, 2025
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
fadymak pushed a commit that referenced this pull request Sep 30, 2025
* Keycloak OAuth Provider

* Update README.md

* Removed the usage of chooseHost to keep things clear

* Allow to use the Keyloak provider in an ID Token grant flow

* fix tests

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keycloak OAuth Provider

4 participants