diff --git a/apps/client-ts/src/components/Auth/b2c/LoginWithStytchSDKUI.tsx b/apps/client-ts/src/components/Auth/b2c/LoginWithStytchSDKUI.tsx index f961ef441..15674fe51 100644 --- a/apps/client-ts/src/components/Auth/b2c/LoginWithStytchSDKUI.tsx +++ b/apps/client-ts/src/components/Auth/b2c/LoginWithStytchSDKUI.tsx @@ -4,6 +4,7 @@ import { StytchLogin } from '@stytch/nextjs'; import { StytchLoginConfig, OAuthProviders, Products, StyleConfig, StytchEvent, StytchError } from '@stytch/vanilla-js'; import { getDomainFromWindow } from '@/lib/stytch/urlUtils'; import { Button } from '@/components/ui/button'; +import { Icons } from '@/components/shared/icons'; const sdkStyle: StyleConfig = { fontFamily: '"Helvetica New", Helvetica, sans-serif', @@ -31,18 +32,47 @@ const callbackConfig = { onError: (error: StytchError) => console.log(error), } +const getOauthUrl = (provider: string) => { + const isTest = process.env.NEXT_PUBLIC_STYTCH_PROJECT_ENV == 'test'; + const baseStytch = isTest ? "test" : "api" + return `https://${baseStytch}.stytch.com/v1/public/oauth/${provider.toLowerCase()}/start?public_token=${process.env.NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN}`; +} + const LoginWithStytchSDKUI = () => { return ( <> -
- - - - - - -
- +
+ +
+
+
+ +
+
+ + Or continue with + +
+
+ + ) } diff --git a/apps/client-ts/src/components/shared/icons.tsx b/apps/client-ts/src/components/shared/icons.tsx new file mode 100644 index 000000000..3e50a2861 --- /dev/null +++ b/apps/client-ts/src/components/shared/icons.tsx @@ -0,0 +1,24 @@ +import { LucideProps } from "lucide-react"; + +export const Icons = { + gitHub: ({ ...props }: LucideProps) => ( + + ), + google: ({ ...props }: LucideProps) => ( + + ) +} \ No newline at end of file