You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check for Google Workspace session control errors (RAPT - Reauthentication Policy Token)
1196
-
// This occurs when the organization enforces periodic re-authentication
1197
-
if(
1198
-
typeoferrorData==='object'&&
1199
-
(errorData.error_subtype==='invalid_rapt'||
1200
-
errorData.error_description?.includes('reauth related error'))
1201
-
){
1202
-
thrownewError(
1203
-
`Session expired due to organization security policy. Please reconnect your ${providerId} account to continue. Alternatively, ask your Google Workspace admin to exempt this app from session control: Admin Console → Security → Google Cloud session control → "Exempt trusted apps".`
1204
-
)
1205
-
}
1206
-
1207
-
if(
1208
-
typeoferrorData==='object'&&
1209
-
errorData.error==='invalid_grant'&&
1210
-
!errorData.error_subtype
1211
-
){
1212
-
thrownewError(
1213
-
`Access has been revoked or the refresh token is no longer valid. Please reconnect your ${providerId} account.`
1214
-
)
1215
-
}
1216
-
1217
1194
thrownewError(`Failed to refresh token: ${response.status}${errorText}`)
1218
1195
}
1219
1196
@@ -1247,6 +1224,6 @@ export async function refreshOAuthToken(
0 commit comments