Skip to content

Fix: Moved keycloak provider into @providers.tsx#152

Open
sle3pyy wants to merge 1 commit into
devfrom
SL-244-provider-do-keycloak-fora-do-provider
Open

Fix: Moved keycloak provider into @providers.tsx#152
sle3pyy wants to merge 1 commit into
devfrom
SL-244-provider-do-keycloak-fora-do-provider

Conversation

@sle3pyy
Copy link
Copy Markdown
Member

@sle3pyy sle3pyy commented May 17, 2026

This pull request refactors how authentication is integrated into the application by moving the ReactKeycloakProvider and its configuration from main.tsx into the Providers component. This centralizes authentication logic and makes the provider easier to manage and extend. The initialization logic for Keycloak is now encapsulated within Providers, and an optional onKeycloakEvent callback can be passed down for event handling.

Authentication integration refactor:

  • Moved the ReactKeycloakProvider and Keycloak initialization options from main.tsx to the Providers component in providers.tsx, centralizing authentication logic. ([[1]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-31185084586cdc563b5a7159b953255407719adc390caa58cee77998ec82fe85R1-R29), [[2]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-20da45cb8443d5036aea448ba7f0379ca304c43e1136ca82d9d43d731a37311eL4), [[3]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-20da45cb8443d5036aea448ba7f0379ca304c43e1136ca82d9d43d731a37311eL14-L22), [[4]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-20da45cb8443d5036aea448ba7f0379ca304c43e1136ca82d9d43d731a37311eL91-L97))
  • Updated the Providers component to accept an optional onKeycloakEvent callback for handling Keycloak events, and to wrap all children (including theming and UI providers) within the authentication context. ([[1]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-31185084586cdc563b5a7159b953255407719adc390caa58cee77998ec82fe85R1-R29), [[2]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-31185084586cdc563b5a7159b953255407719adc390caa58cee77998ec82fe85R43), [[3]](https://github.com/PEI-SecureLearning/core/pull/152/files#diff-20da45cb8443d5036aea448ba7f0379ca304c43e1136ca82d9d43d731a37311eL91-L97))

These changes improve maintainability and make it easier to manage authentication across the application.

@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 138 problems (125 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant