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
| Prop | Type | Description |
|---|---|---|
| provider | string | Provider name (google, github, etc.) |
| mode | string | oauth, password, otp, passkey |
| label | string | Button text |
| redirectTo | string | Post-login redirect path |
| scopes | string[] | OAuth scopes to request |