-
Notifications
You must be signed in to change notification settings - Fork 13.1k
fix: OAuth login buttons not showing up #35864
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 8be347e The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35864 +/- ##
===========================================
+ Coverage 61.26% 61.28% +0.01%
===========================================
Files 3164 3016 -148
Lines 74757 71658 -3099
Branches 16689 16393 -296
===========================================
- Hits 45801 43913 -1888
+ Misses 25850 24756 -1094
+ Partials 3106 2989 -117
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
This bug happened because due to a combination of three different issues in the codebase:
The bug only happens if the AppLayout component gets re-rendered, which is not standard behavior to begin with, but I didn't look into why that was happening.
Fixing any of those issues would be enough to squash this bug, but this PR fixes all of them:
Issue(s)
CORE-1153
Steps to test or reproduce
Further comments
This pull request addresses an issue with OAuth login buttons not displaying in the Rocket.Chat application. The changes include:
Custom OAuth Configuration: A new mechanism is introduced in
CustomOAuth.tsto manage custom OAuth service configurations on the client side. This involves adding a map (configuredOAuthServices) to storeCustomOAuthinstances and a static method (configureOAuthService) to update or register configurations, avoiding conflicts with existing services registered via Meteor'sAccounts.oauth.Error Handling and Method Improvement: In
loginServices.ts, error handling is added for emitting loaded services, and theonLoadmethod implementation is improved.Refactoring of useCustomOAuth Hook: The
useCustomOAuthhook inuseCustomOAuth.tsis refactored to utilize the static methodCustomOAuth.configureOAuthService, simplifying the configuration process while maintaining the core logic of iterating through login services.Module Definition Update: A new function
serviceNamesis added to the oauth namespace in theaccounts-base.d.tsmodule definition, enhancing the module without introducing security or functional concerns.Documentation: A changeset file is added to document the patch fixing the OAuth login button visibility issue.
These changes aim to resolve the visibility issue of OAuth login buttons and improve the overall configuration and error handling processes related to OAuth services.