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.

617 B
Raw Blame
import { APP_DOMAIN_WITH_NGROK } from "@dub/utils";
import * as z from "zod/v4";
import { OAuthProvider } from "../oauth-provider";

export const bitlyOAuthProvider = new OAuthProvider({
  name: "Bitly",
  clientId: process.env.BITLY_CLIENT_ID!,
  clientSecret: process.env.BITLY_CLIENT_SECRET!,
  authUrl: "https://bitly.com/oauth/authorize",
  tokenUrl: "https://api-ssl.bitly.com/oauth/access_token",
  redirectUri: `${APP_DOMAIN_WITH_NGROK}/api/callback/bitly`,
  redisStatePrefix: "bitly:oauth:state",
  tokenSchema: z.string(),
  bodyFormat: "form",
  authorizationMethod: "body",
  responseFormat: "text",
});