From 3a247454ca14678191dbe1cb56b2cfc815807cc6 Mon Sep 17 00:00:00 2001
From: Filipe Brito <filipedelimabrito@gmail.com>
Date: Thu, 22 Aug 2019 16:24:27 -0300
Subject: [PATCH] [IMPROVEMENT] Checks if custom OAuth button should be shown
 (#1140)

---
 app/lib/rocketchat.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js
index b4723b329..a445a514f 100644
--- a/app/lib/rocketchat.js
+++ b/app/lib/rocketchat.js
@@ -806,9 +806,11 @@ const RocketChat = {
 		}
 	},
 	_determineAuthType(services) {
-		const { name, custom, service } = services;
+		const {
+			name, custom, showButton = true, service
+		} = services;
 
-		if (custom) {
+		if (custom && showButton) {
 			return 'oauth_custom';
 		}
 
-- 
GitLab