The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add prefix back to access token
Steven Teycf7176c6e4e1
diff --git a/apps/web/app/api/oauth/token/exchange-code-for-token.ts b/apps/web/app/api/oauth/token/exchange-code-for-token.tsindex 405d482e87..f9451109d5 100644--- a/apps/web/app/api/oauth/token/exchange-code-for-token.ts+++ b/apps/web/app/api/oauth/token/exchange-code-for-token.ts@@ -161,6 +161,7 @@ export const exchangeAuthCodeForToken = async (const accessToken = createToken({length: OAUTH_CONFIG.ACCESS_TOKEN_LENGTH,+ prefix: OAUTH_CONFIG.ACCESS_TOKEN_PREFIX,});const refreshToken = createToken({length: OAUTH_CONFIG.REFRESH_TOKEN_LENGTH,diff --git a/apps/web/app/api/oauth/token/refresh-access-token.ts b/apps/web/app/api/oauth/token/refresh-access-token.tsindex 90f30153f7..5d33a312a0 100644--- a/apps/web/app/api/oauth/token/refresh-access-token.ts+++ b/apps/web/app/api/oauth/token/refresh-access-token.ts@@ -126,6 +126,7 @@ export const refreshAccessToken = async (const newAccessToken = createToken({length: OAUTH_CONFIG.ACCESS_TOKEN_LENGTH,+ prefix: OAUTH_CONFIG.ACCESS_TOKEN_PREFIX,});const newRefreshToken = createToken({length: OAUTH_CONFIG.REFRESH_TOKEN_LENGTH,diff --git a/apps/web/app/app.dub.co/(auth)/oauth/authorize/page.tsx b/apps/web/app/app.dub.co/(auth)/oauth/authorize/page.tsxindex cb7a513774..f4db3ab9a0 100644--- a/apps/web/app/app.dub.co/(auth)/oauth/authorize/page.tsx+++ b/apps/web/app/app.dub.co/(auth)/oauth/authorize/page.tsx@@ -43,7 +43,7 @@ export default async function Authorize({}return (- <div className="relative z-10 mt-[calc(30vh)] h-fit w-full max-w-md overflow-hidden border-y border-gray-200 sm:rounded-2xl sm:border sm:shadow-xl">+ <div className="relative z-10 m-auto h-fit w-full max-w-md overflow-hidden border-y border-gray-200 sm:rounded-2xl sm:border sm:shadow-xl"><div className="flex flex-col items-center justify-center space-y-6 border-b border-gray-200 bg-white px-4 py-6 pt-8 text-center sm:px-16"><div className="flex items-center gap-3"><a href={oAuthApp.website} target="_blank" rel="noreferrer">diff --git a/apps/web/lib/api/oauth/constants.ts b/apps/web/lib/api/oauth/constants.tsindex e574186948..a5c1ffde95 100644--- a/apps/web/lib/api/oauth/constants.ts+++ b/apps/web/lib/api/oauth/constants.ts@@ -12,6 +12,7 @@ export const OAUTH_CONFIG = {CLIENT_ID_PREFIX: "dub_app_",CLIENT_SECRET_PREFIX: "dub_app_secret_",+ ACCESS_TOKEN_PREFIX: "dub_access_token_",};// These are the scopes an OAuth app can request on behalf of an userdiff --git a/apps/web/ui/modals/add-edit-oauth-app-modal.tsx b/apps/web/ui/modals/add-edit-oauth-app-modal.tsxindex f7bcdcdc6e..c429276ce7 100644--- a/apps/web/ui/modals/add-edit-oauth-app-modal.tsx+++ b/apps/web/ui/modals/add-edit-oauth-app-modal.tsx@@ -216,7 +216,7 @@ function AddEditAppModal({</div></div>- <div className="flex items-center justify-between pb-4">+ <div className="flex items-center justify-between pb-4 pt-2"><label htmlFor="pkce" className="flex items-center space-x-2"><h2 className="text-sm font-medium text-gray-900">Allow PKCE</h2><InfoTooltip content="We strongly recommend using the PKCE flow for increased security" />