mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
UI: Add Auth and OAuth classes
Allows the ability to authenticate to a specific service. Typically via OAuth.
This commit is contained in:
@@ -232,7 +232,9 @@ bool OBSBasic::AddProfile(bool create_new, const char *title, const char *text,
|
||||
config_set_string(App()->GlobalConfig(), "Basic", "ProfileDir",
|
||||
newDir.c_str());
|
||||
|
||||
Auth::Save();
|
||||
if (create_new) {
|
||||
auth.reset();
|
||||
DestroyPanelCookieManager();
|
||||
} else if (!rename) {
|
||||
DuplicateCurrentCookieProfile(config);
|
||||
@@ -456,6 +458,8 @@ void OBSBasic::on_actionRemoveProfile_triggered()
|
||||
config_set_string(App()->GlobalConfig(), "Basic", "ProfileDir",
|
||||
newDir);
|
||||
|
||||
Auth::Save();
|
||||
auth.reset();
|
||||
DestroyPanelCookieManager();
|
||||
|
||||
config.Swap(basicConfig);
|
||||
@@ -471,6 +475,8 @@ void OBSBasic::on_actionRemoveProfile_triggered()
|
||||
|
||||
UpdateTitleBar();
|
||||
|
||||
Auth::Load();
|
||||
|
||||
if (api) {
|
||||
api->on_event(OBS_FRONTEND_EVENT_PROFILE_LIST_CHANGED);
|
||||
api->on_event(OBS_FRONTEND_EVENT_PROFILE_CHANGED);
|
||||
@@ -615,6 +621,8 @@ void OBSBasic::ChangeProfile()
|
||||
config_set_string(App()->GlobalConfig(), "Basic", "ProfileDir",
|
||||
newDir);
|
||||
|
||||
Auth::Save();
|
||||
auth.reset();
|
||||
DestroyPanelCookieManager();
|
||||
|
||||
config.Swap(basicConfig);
|
||||
@@ -624,6 +632,8 @@ void OBSBasic::ChangeProfile()
|
||||
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
|
||||
UpdateTitleBar();
|
||||
|
||||
Auth::Load();
|
||||
|
||||
CheckForSimpleModeX264Fallback();
|
||||
|
||||
blog(LOG_INFO, "Switched to profile '%s' (%s)",
|
||||
|
||||
Reference in New Issue
Block a user