-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Open
Labels
Description
Description:
Custom OAuth show_button cannot be reliably set to false during provider initialization.
When _show_button=false is provided, the setting is still persisted as true, so the login button remains visible.
Steps to reproduce:
- Set environment variables for a custom OAuth provider, for example:
Accounts_OAuth_Custom_Github=trueAccounts_OAuth_Custom_Github_show_button=false
- Start Rocket.Chat.
- Open Administration > Settings > OAuth > Custom OAuth: Github and check
show_buttonvalue. - Check login page provider visibility.
Expected behavior:
If Accounts_OAuth_Custom_<Provider>_show_button=false is set, the provider login button should be hidden (show_button=false persisted).
Actual behavior:
show_button is persisted as true, so the provider login button is still shown.
Server Setup Information:
- Version of Rocket.Chat Server: 8.3.0-develop
- License Type: N/A
- Number of Users: N/A
- Operating System: N/A
- Deployment Method: docker/env-based setup
- Number of Running Instances: N/A
- DB Replicaset Oplog: N/A
- NodeJS Version: N/A
- MongoDB Version: N/A
Client Setup Information
- Desktop App or Browser Version: Any
- Operating System: Any
Additional context
Code path involved:
apps/meteor/server/lib/oauth/initCustomOAuthServices.tspassesshowButtonfrom env.apps/meteor/server/lib/oauth/addOAuthService.tsusesvalues.showButton || trueforAccounts_OAuth_Custom-<name>-show_button, which converts explicitfalsetotrue.
Relevant logs:
N/A
Reactions are currently unavailable