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
2 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue