Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak OAuth #1634

Open
onecrazygenius opened this issue Nov 27, 2024 · 3 comments
Open

Keycloak OAuth #1634

onecrazygenius opened this issue Nov 27, 2024 · 3 comments

Comments

@onecrazygenius
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently the OAuth providers available is only cognito as I can see. I'm willing to commit support for creating the keycloak provider however I'm finding challenge in the complexity of the codebase hardcoding of providers despite config initially seeming more flexible. I'm working on something but get stuck with the /api/connect/{provider}/login and what work needs to be done from there.

Please see my fork for my progress so far if that's helpful!

Describe the solution you'd like

Using keycloak for login/authentication instead of cognito as the OAuth provider

Describe alternatives you've considered

Our usecase requires keycloak for OAuth2

@onecrazygenius
Copy link
Contributor Author

I have locally fixed the default.cjs for the grant library so going to localhost:8080 gets me the keycloak login:
image

however, once I authenticate the redirect back to bailo goes into a spam refresh state, saying unauthorized.
image

any chance you have encountered this issue with cognito and have recommended steps to solve? I definitely have the correct scopes as I have tested the keycloak oauth flow in postman with the same config and got userinfo back as expected.

@onecrazygenius
Copy link
Contributor Author

Can I confirm if the cognito works and you can share a sample config. I have tested my grant config with an express server and get the session and jwt after the auth flow, but when in the bailo config the only conclusion I can pull from network tab is there is a race condition on the api calls overwriting the session

@JR40159
Copy link
Member

JR40159 commented Jan 2, 2025

Hi, as discussed in a separate thread, the cause of your issue was the Grant configuration you'd written not working with a Keycloak instance running in a Docker container. You need to provide an access_url that is accessible from the Bailo backend container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants