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

Jempi base keycloak login UI updates #127

Merged
merged 25 commits into from
Nov 21, 2023

Conversation

walisc
Copy link
Collaborator

@walisc walisc commented Oct 16, 2023

Ticket: N/A
Other Related Tickets: N/A


Describe of changes

This change adds keyclock login abilities to the JEMPI_UI app. When Single Sign On (SSO) is enabled, the user will need to authenticate themselve via the configured keyclock instance (see below)

login.mp4

In addition to this, this pull request also

  1. Add Login tests (found at JeMPI_Apps/JeMPI_UI/tests/hooks/useAuth.test.ts)
  2. Add Testing tools. This includes
    • MockJeMPI_API - Mocks the JEMPI API Server (found at JeMPI_Apps/JeMPI_API_KC). To read more see JeMPI_Apps/JeMPI_UI/tests/test.utils/mocks/enviroments/MockJeMPI_API/README.md
    • MockKeyCloak - Mocks the Keycloak Server. JeMPI_Apps/JeMPI_UI/tests/test.utils/mocks/enviroments/MockKeyCloak/README.md
  3. Includes small bug fixes

Future considerations

Currently you can set REACT_APP_MOCK_BACKEND to true in the env file. This uses a statically mocked version of the api version. As there is now a mock API server for testing (above), this code can be moved there, as removed from the src folder. This also helps improve security as the tests folder is not bundled with the final app.

How to test

  1. In a seperated terminal naviagate to JeMPI_Apps/JeMPI_UI
  2. run npm run mock:enviroments (this will start both the MockJeMPI_API and the MockKeyCloak Servers)
  3. run npm run start to start the app
  4. Follow the steps like the video above

@walisc walisc added the enhancement New feature or request label Oct 16, 2023
@walisc walisc requested a review from issambaccouch October 16, 2023 07:11
@walisc
Copy link
Collaborator Author

walisc commented Oct 16, 2023

@ajinkyagadewar if you also want to have a look.

@walisc walisc changed the title Jempi base keycloack login UI updates Jempi base keycloak login UI updates Oct 16, 2023
@walisc
Copy link
Collaborator Author

walisc commented Oct 19, 2023

Hi @issambaccouch. Have updated this based on your comments above.

@walisc walisc changed the base branch from jempi-base to dev November 17, 2023 10:30
@walisc
Copy link
Collaborator Author

walisc commented Nov 17, 2023

Hi @issambaccouch. Have now resolved the merge conflicts on this (and tested). Could you please merge it, as I need it for #132. Many thanks!

Copy link
Contributor

@issambaccouch issambaccouch left a comment

Choose a reason for hiding this comment

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

@walisc Great work Chidow.

@walisc walisc merged commit 55eedcc into jembi:dev Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants