src/examples/sign-in/WithUi.tsx

Every source

src/examples/sign-in/WithUi.tsx
'use client'

import { SignInButton, SignedIn, SignedOut, UserButton } from '@synqauth/react'

// Sign-in with Synq's UI: one button sends the browser to the brand's hosted
// page, which offers every method the brand has on (passkeys, email codes,
// passwords, wallets, Google, Apple, Microsoft, Discord, X, Facebook) and
// comes back signed in. UserButton is the signed-in person's menu.
export function SignInWithUi() {
  return (
    <>
      <SignedOut>
        <SignInButton returnTo="/build/sign-in" />
      </SignedOut>
      <SignedIn>
        <UserButton accountHref="/build/profile" />
      </SignedIn>
    </>
  )
}