diff --git a/my-blog/static/oauth/index.html b/my-blog/static/oauth/index.html index ee853ad..f44febe 100644 --- a/my-blog/static/oauth/index.html +++ b/my-blog/static/oauth/index.html @@ -1,3 +1,3 @@ - + diff --git a/oauth/src/App.jsx b/oauth/src/App.jsx index 11fac13..a6fafd8 100644 --- a/oauth/src/App.jsx +++ b/oauth/src/App.jsx @@ -24,6 +24,13 @@ export default function App() { // Event listeners for blog communication useEffect(() => { + // Clear OAuth completion flag once app is loaded + if (sessionStorage.getItem('oauth_just_completed') === 'true') { + setTimeout(() => { + sessionStorage.removeItem('oauth_just_completed') + }, 1000) + } + const handleAIQuestion = (event) => { const { question } = event.detail if (question && adminData && user && agent) { @@ -67,7 +74,11 @@ export default function App() { const isLoading = authLoading || dataLoading || userLoading - if (isLoading) { + // Don't show loading if we just completed OAuth callback + const isOAuthReturn = window.location.pathname === '/oauth/callback' || + sessionStorage.getItem('oauth_just_completed') === 'true' + + if (isLoading && !isOAuthReturn) { return (
{ window.location.href = returnUrl