From 31d3594c2ce081d9d3408a5435aafbe6b4eee816 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 1 Apr 2021 10:29:21 -0300 Subject: [PATCH] [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020) --- app/views/AuthenticationWebView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/AuthenticationWebView.js b/app/views/AuthenticationWebView.js index 24e0639ae..b21c85bba 100644 --- a/app/views/AuthenticationWebView.js +++ b/app/views/AuthenticationWebView.js @@ -125,7 +125,7 @@ class AuthenticationWebView extends React.PureComponent { if (this.oauthRedirectRegex.test(url)) { const parts = url.split('#'); const credentials = JSON.parse(parts[1]); - this.login({ oauth: { ...credentials } }); + this.debouncedLogin({ oauth: { ...credentials } }); } } @@ -138,7 +138,7 @@ class AuthenticationWebView extends React.PureComponent { this.tryLogin(); break; case 'login-with-token': - this.login({ resume: credentials.token || credentials.loginToken }); + this.debouncedLogin({ resume: credentials.token || credentials.loginToken }); break; default: // Do nothing