mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Delete cookies before connecting account
Fixes an issue where when trying to connect a Twitch account, and the Twitch two-factor authentication check fails, the user will still technically be logged in because the cookies will still be present, thus when they try to click the "Connect" button again, it will skip the login part (because they're already technically logged in), and just give them the two-factor failure message without letting them enter in their login information again.
This commit is contained in:
parent
cfddf1112b
commit
ccb7d897c6
|
@ -417,6 +417,8 @@ void AutoConfigStreamPage::on_connectAccount_clicked()
|
|||
#ifdef BROWSER_AVAILABLE
|
||||
std::string service = QT_TO_UTF8(ui->service->currentText());
|
||||
|
||||
OAuth::DeleteCookies(service);
|
||||
|
||||
auth = OAuthStreamKey::Login(this, service);
|
||||
if (!!auth)
|
||||
OnAuthConnected();
|
||||
|
|
|
@ -492,6 +492,8 @@ void OBSBasicSettings::on_connectAccount_clicked()
|
|||
#ifdef BROWSER_AVAILABLE
|
||||
std::string service = QT_TO_UTF8(ui->service->currentText());
|
||||
|
||||
OAuth::DeleteCookies(service);
|
||||
|
||||
auth = OAuthStreamKey::Login(this, service);
|
||||
if (!!auth)
|
||||
OnAuthConnected();
|
||||
|
|
Loading…
Reference in a new issue