@@ -52,10 +52,6 @@ export const OAuthConnector = ({
5252
5353 for ( let attempt = 1 ; attempt <= maxRetries ; attempt ++ ) {
5454 try {
55- console . log (
56- `Checking Google OAuth connection status (attempt ${ attempt } /${ maxRetries } )...`
57- ) ;
58-
5955 const { connected, token } = await callAppActionWithResult < CheckStatusResponse > (
6056 sdk ,
6157 'checkGdocOauthTokenStatus' ,
@@ -64,19 +60,13 @@ export const OAuthConnector = ({
6460
6561 // Assuming the response contains a connected field
6662 const isConnected = connected === true ;
67- console . log ( `Google OAuth connection status (attempt ${ attempt } ):` , isConnected ) ;
6863 onOauthTokenChange ( token ) ;
6964
7065 // If we have an expected status and it matches, or if we don't have an expected status, accept the result
7166 if ( expectedStatus === undefined || isConnected === expectedStatus ) {
7267 onOAuthConnectedChange ( isConnected ) ;
73- console . log ( `Status check resolved to expected value: ${ isConnected } ` ) ;
7468 break ;
7569 } else {
76- console . log (
77- `Status mismatch. Expected: ${ expectedStatus } , Got: ${ isConnected } . Retrying...`
78- ) ;
79-
8070 // If this is the last attempt, accept the current result anyway
8171 if ( attempt === maxRetries ) {
8272 console . log ( `Max retries reached. Accepting current status: ${ isConnected } ` ) ;
@@ -86,7 +76,6 @@ export const OAuthConnector = ({
8676
8777 // Wait before retrying (exponential backoff: 500ms, 1000ms, 1500ms, etc.)
8878 const waitTime = 500 * attempt ;
89- console . log ( `Waiting ${ waitTime } ms before retry...` ) ;
9079 await delay ( waitTime ) ;
9180 }
9281 } catch ( error ) {
@@ -101,13 +90,11 @@ export const OAuthConnector = ({
10190
10291 // Wait before retrying on error
10392 const waitTime = 500 * attempt ;
104- console . log ( `Waiting ${ waitTime } ms before retry after error...` ) ;
10593 await delay ( waitTime ) ;
10694 }
10795 }
10896
10997 setLoadingState ( OAuthLoadingState . IDLE ) ;
110- console . log ( `Status check polling completed. Final status: ${ isOAuthConnected } ` ) ;
11198 } ;
11299
113100 const messageHandler = async ( event : MessageEvent ) => {
0 commit comments