Fix Bug 63407 - Accounts: Two-factor authentication: Authorization through social networks does not work when two-factor authentication is enabled
This commit is contained in:
parent
012cc69ce0
commit
078073d0df
@ -73,9 +73,15 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
|
||||
thirdPartyLogin(profile)
|
||||
.then((response) => {
|
||||
if (!response || !response.token) throw new Error("Empty API response");
|
||||
if (!(response || response.token || response.confirmUrl))
|
||||
throw new Error("Empty API response");
|
||||
|
||||
setWithCredentialsStatus(true);
|
||||
|
||||
if (response.confirmUrl) {
|
||||
return window.location.replace(response.confirmUrl);
|
||||
}
|
||||
|
||||
const redirectPath = sessionStorage.getItem("referenceUrl");
|
||||
|
||||
if (redirectPath) {
|
||||
|
Loading…
Reference in New Issue
Block a user