(pathname: string)
| 83 | const SOCIAL_CALLBACK_PREFIX = "/api/auth/callback/"; |
| 84 | |
| 85 | const isSocialCallbackPath = (pathname: string): boolean => { |
| 86 | if (!pathname.startsWith(SOCIAL_CALLBACK_PREFIX)) return false; |
| 87 | const provider = pathname.slice(SOCIAL_CALLBACK_PREFIX.length); |
| 88 | return provider.length > 0 && !provider.includes("/"); |
| 89 | }; |
| 90 | |
| 91 | /** Whether a pathname is a sign-up entry point that redirects to v2. */ |
| 92 | export const isSignUpPath = (pathname: string): boolean => SIGN_UP_PATHS.has(pathname); |