From 2d6ea9ce8db4951277dde22895d1937412e34e8d Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Thu, 13 Aug 2026 09:23:04 +0200 Subject: [PATCH] fix(auth): allow implicit social signup --- .../features/auth/components/social-auth.tsx | 29 +--- apps/web/src/features/auth/pages/register.tsx | 2 +- .../2026-08-13-implicit-social-signup.md | 152 ++++++++++++++++++ packages/auth/src/config.test.ts | 15 ++ packages/auth/src/config.ts | 3 - 5 files changed, 174 insertions(+), 27 deletions(-) create mode 100644 docs/superpowers/plans/2026-08-13-implicit-social-signup.md create mode 100644 packages/auth/src/config.test.ts diff --git a/apps/web/src/features/auth/components/social-auth.tsx b/apps/web/src/features/auth/components/social-auth.tsx index f8a71cf42..79131c7d3 100644 --- a/apps/web/src/features/auth/components/social-auth.tsx +++ b/apps/web/src/features/auth/components/social-auth.tsx @@ -11,23 +11,7 @@ import { cn } from "@reactive-resume/utils/style"; import { authClient } from "@/libs/auth/client"; import { orpc } from "@/libs/orpc/client"; -type SocialAuthProps = { - requestSignUp?: boolean; -}; - -type SocialSignInOptions = { - provider: string; - callbackURL: string; - requestSignUp?: true; -}; - -function getSocialSignInOptions(provider: string, requestSignUp: boolean): SocialSignInOptions { - const options: SocialSignInOptions = { provider, callbackURL: "/dashboard" }; - if (requestSignUp) options.requestSignUp = true; - return options; -} - -export function SocialAuth({ requestSignUp = false }: SocialAuthProps) { +export function SocialAuth() { const { data: providers = {}, isLoading } = useQuery(orpc.auth.providers.list.queryOptions()); return ( @@ -42,7 +26,7 @@ export function SocialAuth({ requestSignUp = false }: SocialAuthProps) {
- {isLoading ? : } + {isLoading ? : } ); } @@ -60,10 +44,9 @@ function SocialAuthSkeleton() { type SocialAuthButtonsProps = { providers: RouterOutput["auth"]["providers"]["list"]; - requestSignUp: boolean; }; -function SocialAuthButtons({ providers, requestSignUp }: SocialAuthButtonsProps) { +function SocialAuthButtons({ providers }: SocialAuthButtonsProps) { const router = useRouter(); const runSignIn = async (fn: () => Promise<{ error: { message?: string } | null }>) => { @@ -112,7 +95,7 @@ function SocialAuthButtons({ providers, requestSignUp }: SocialAuthButtonsProps)