Auto-reconnect after OAuth

This commit is contained in:
Justin Spahr-Summers
2025-01-24 15:17:03 +00:00
parent c22f91858c
commit 0648ba44e3
2 changed files with 17 additions and 2 deletions

View File

@@ -19,8 +19,8 @@ const OAuthCallback = () => {
const accessToken = await handleOAuthCallback(serverUrl, code);
// Store the access token for future use
sessionStorage.setItem(SESSION_KEYS.ACCESS_TOKEN, accessToken);
// Redirect back to the main app
window.location.href = '/';
// Redirect back to the main app with server URL to trigger auto-connect
window.location.href = `/?serverUrl=${encodeURIComponent(serverUrl)}`;
} catch (error) {
console.error('OAuth callback error:', error);
window.location.href = '/';