Remove reload auth

This commit is contained in:
Eric Traut
2026-03-14 14:44:04 -06:00
parent 1451ad85b1
commit ed0601b15b
4 changed files with 2 additions and 27 deletions

View File

@@ -576,15 +576,6 @@ impl InProcessAppServerClient {
})?
}
/// Reloads managed auth state from disk for the embedded runtime.
///
/// This keeps embedders off direct `AuthManager` access while still
/// allowing onboarding flows to observe auth changes performed outside the
/// app-server request path.
pub fn reload_auth_from_storage(&self) -> bool {
self.shared_core.auth_manager.reload()
}
/// Returns the next in-process event, or `None` when worker exits.
///
/// Callers are expected to drain this stream promptly. If they fall behind,

View File

@@ -17,7 +17,6 @@ pub(crate) enum AuthCommand {
StartApiKey { api_key: String },
StartChatgpt,
CancelChatgpt { login_id: String },
ReloadManagedChatgptAuth,
DeviceCodeFailed { message: String },
}

View File

@@ -63,14 +63,12 @@ pub(super) fn start_headless_chatgpt_login(widget: &mut AuthModeWidget, opts: Se
result = complete_device_code_login(opts, device_code) => {
match result {
Ok(()) => {
if set_device_code_state_for_active_attempt(
let _ = set_device_code_state_for_active_attempt(
&sign_in_state,
&request_frame,
&cancel,
SignInState::ChatGptSuccessMessage,
) {
let _ = auth_command_tx.send(AuthCommand::ReloadManagedChatgptAuth);
}
);
}
Err(err) => {
if set_device_code_state_for_active_attempt(

View File

@@ -576,19 +576,6 @@ async fn handle_auth_command(
tracing::warn!("failed to cancel onboarding login: {err}");
}
}
AuthCommand::ReloadManagedChatgptAuth => {
app_server.reload_auth_from_storage();
match account_api.read_account(app_server).await {
Ok(response) => {
if let Some(auth_widget) = onboarding_screen.auth_widget_mut() {
auth_widget.apply_account(response.account.as_ref());
}
}
Err(err) => {
tracing::warn!("failed to refresh managed auth after device code login: {err}")
}
}
}
AuthCommand::DeviceCodeFailed { message } => {
if let Some(auth_widget) = onboarding_screen.auth_widget_mut() {
auth_widget.show_device_code_login_error(message);