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

Add Keycloak OAuth login #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add Keycloak OAuth login #159

wants to merge 2 commits into from

Conversation

nickclyde
Copy link
Member

PULL REQUEST

Summary

This adds an OAuth login flow to the app. Instead of using the sign in page, the sign in button in the Header now redirects to Keycloak. When you login with Keycloak successfully, it redirects back to the app at /query.

To test this locally, be sure to npm install to get auth.js, then you can run Keycloak via the configuration I added to the docker compose dev file. EG docker compose -f docker-compose-dev.yaml up keycloak. Once it's running, you'll need to go to http://localhost:8080 and create a client named query-connector. Then you'll need to grab the client secret and set the following variables in .env:

AUTH_KEYCLOAK_ID=query-connector
AUTH_KEYCLOAK_SECRET=your-client-secret
AUTH_KEYCLOAK_ISSUER=http://localhost:8080/realms/master

More info on this page: https://authjs.dev/getting-started/providers/keycloak

Related Issue

Fixes https://linear.app/skylight-cdc/issue/QUE-22/spike-for-supporting-key-cloak

Copy link

linear bot commented Nov 14, 2024

Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-11-14 at 11 22 30 AM

I made it to this page but did not see a client secret? Is there an additional step we need to do here in terms of the client authentication?

@m-goggins
Copy link
Collaborator

Is there supposed to be an option to create a user on the localhost:8080 page? I can only see a login:

image

@robertandremitchell
Copy link
Collaborator

robertandremitchell commented Nov 14, 2024

Is there supposed to be an option to create a user on the localhost:8080 page? I can only see a login:

image

I got in using admin/admin based off docker dev, not sure if that's right tho

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

Successfully merging this pull request may close these issues.

3 participants