Added profile ARN handling in OAuth provider mapping and improved polling logic in OAuth modal for better user experience.

This commit is contained in:
decolua
2026-03-06 00:21:27 +07:00
parent f4e08fcd16
commit 75f486b7a2
5 changed files with 105 additions and 17 deletions
+14 -9
View File
@@ -660,6 +660,7 @@ const PROVIDERS = {
access_token: data.accessToken,
refresh_token: data.refreshToken,
expires_in: data.expiresIn,
profile_arn: data?.profileArn || null,
// Store client credentials for refresh
_clientId: extraData?._clientId,
_clientSecret: extraData?._clientSecret,
@@ -675,15 +676,19 @@ const PROVIDERS = {
},
};
},
mapTokens: (tokens) => ({
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresIn: tokens.expires_in,
providerSpecificData: {
clientId: tokens._clientId,
clientSecret: tokens._clientSecret,
},
}),
mapTokens: (tokens) => {
const mapped = {
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresIn: tokens.expires_in,
providerSpecificData: {
profileArn: tokens?.profile_arn || null,
clientId: tokens._clientId,
clientSecret: tokens._clientSecret,
},
};
return mapped;
},
},
cursor: {