Fix: Moved keycloak provider into @providers.tsx#152
Open
sle3pyy wants to merge 1 commit into
Open
Conversation
Lint ReportResult: Download Full Lint Log |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request refactors how authentication is integrated into the application by moving the
ReactKeycloakProviderand its configuration frommain.tsxinto theProviderscomponent. This centralizes authentication logic and makes the provider easier to manage and extend. The initialization logic for Keycloak is now encapsulated withinProviders, and an optionalonKeycloakEventcallback can be passed down for event handling.Authentication integration refactor:
ReactKeycloakProviderand Keycloak initialization options frommain.tsxto theProviderscomponent inproviders.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))Providerscomponent to accept an optionalonKeycloakEventcallback 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.