From 2b1dc27181893a640bd2931c2300d8b902686ba6 Mon Sep 17 00:00:00 2001 From: Filipe Brito Date: Mon, 16 Sep 2019 18:00:44 -0300 Subject: [PATCH] [FIX] Custom OAuth URL (#1172) * Fix custom oauth url. * Removes console.log(...) --- app/views/LoginSignupView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/LoginSignupView.js b/app/views/LoginSignupView.js index 3e795bcc9..0f55361f8 100644 --- a/app/views/LoginSignupView.js +++ b/app/views/LoginSignupView.js @@ -231,7 +231,9 @@ class LoginSignupView extends React.Component { const redirectUri = `${ server }/_oauth/${ service }`; const state = this.getOAuthState(); const params = `?client_id=${ clientId }&redirect_uri=${ redirectUri }&response_type=code&state=${ state }&scope=${ scope }`; - const url = `${ serverURL }${ authorizePath }${ params }`; + const domain = `${ serverURL }`; + const absolutePath = `${ authorizePath }${ params }`; + const url = absolutePath.includes(domain) ? absolutePath : domain + absolutePath; this.openOAuth({ url }); }