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.

Prevent OAuth state reuse

Kiran K1987c9e94919
diff --git a/apps/web/lib/integrations/oauth-provider.ts b/apps/web/lib/integrations/oauth-provider.ts
index 6c14a9433b..a5d0608340 100644
--- a/apps/web/lib/integrations/oauth-provider.ts
+++ b/apps/web/lib/integrations/oauth-provider.ts
@@ -1,5 +1,4 @@
import { getSearchParams, nanoid } from "@dub/utils";
-
import { z } from "zod";
import { redis } from "../upstash";
@@ -53,7 +52,7 @@ export class OAuthProvider<T extends z.ZodSchema> {
getSearchParams(request.url),
);
- const contextId = await redis.get<K>(
+ const contextId = await redis.getdel<K>(
`${this.provider.redisStatePrefix}:${state}`,
);