[FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)

This commit is contained in:
Diego Mello 2021-04-01 10:29:21 -03:00 committed by GitHub
parent bb844e52fb
commit 31d3594c2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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