mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-01 09:55:34 +08:00
fix: refresh Claude auth status after login flow (#617)
* fix: refresh Claude auth status after login flow * fix: rely on refreshed auth status after login --------- Co-authored-by: HolyCode User <noreply@holycode.local>
This commit is contained in:
@@ -213,12 +213,19 @@ export function useSettingsController({ isOpen, initialTab }: UseSettingsControl
|
||||
}, []);
|
||||
|
||||
const handleLoginComplete = useCallback((exitCode: number) => {
|
||||
if (exitCode !== 0 || !loginProvider) {
|
||||
if (!loginProvider) {
|
||||
return;
|
||||
}
|
||||
|
||||
setSaveStatus('success');
|
||||
void checkProviderAuthStatus(loginProvider);
|
||||
void (async () => {
|
||||
const authStatus = await checkProviderAuthStatus(loginProvider);
|
||||
|
||||
if (exitCode !== 0) {
|
||||
console.warn(`Login process exited with code ${exitCode}; refreshing auth status before setting save status.`);
|
||||
}
|
||||
|
||||
setSaveStatus(authStatus.authenticated ? 'success' : 'error');
|
||||
})();
|
||||
}, [checkProviderAuthStatus, loginProvider]);
|
||||
|
||||
const saveSettings = useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user