Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update refresh-access-token.ts

Kiran K3fc315d7d22c
diff --git a/apps/web/app/api/oauth/token/refresh-access-token.ts b/apps/web/app/api/oauth/token/refresh-access-token.ts
index 379b3fa973..0beea68e13 100644
--- a/apps/web/app/api/oauth/token/refresh-access-token.ts
+++ b/apps/web/app/api/oauth/token/refresh-access-token.ts
@@ -51,6 +51,11 @@ export const refreshAccessToken = async (
pkce: true,
integrationId: true,
hashedClientSecret: true,
+ integration: {
+ select: {
+ name: true,
+ },
+ },
},
});
@@ -61,6 +66,7 @@ export const refreshAccessToken = async (
});
}
+
if (!oAuthApp.pkce) {
if (!clientSecret) {
throw new DubApiError({
@@ -77,6 +83,11 @@ export const refreshAccessToken = async (
}
}
+ console.log(`${oAuthApp.integration?.name} is refreshing the access token.`, {
+
+ });
+
+
const refreshTokenRecord = await prisma.oAuthRefreshToken.findUnique({
where: {
hashedRefreshToken: await hashToken(refresh_token),