AuthButton

Single sign-in button component with built-in loading and error states.

Basic Usage

<script>
  import { AuthButton } from '@kavach/ui'
</script>

<AuthButton provider="google" />

With Custom Label

<AuthButton 
  provider="google" 
  label="Sign in with Google" 
/>

OAuth Flow

<AuthButton 
  provider="google" 
  mode="oauth"
  redirectTo="/dashboard"
/>

Password Flow

<AuthButton 
  provider="password"
  mode="password"
/>

Props

PropTypeDescription
providerstringProvider name (google, github, etc.)
modestringoauth, password, otp, passkey
labelstringButton text
redirectTostringPost-login redirect path
scopesstring[]OAuth scopes to request

Next Steps

Kavach — Authentication made simple llms.txt