
Product
Introducing Manifest Alerts
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.
facegate-react
Advanced tools
Drop-in face authentication component for React. Add face login in 3 lines of code.
npm install @facegate/react @facegate/client
import { FaceGate } from '@facegate/react'
function LoginPage() {
return (
<FaceGate
apiKey="fg_live_your_key"
provider="supabase"
onAuthenticated={(session) => {
// session.token — FaceGate JWT
// session.user — { id, name, role }
// session.provider_session — Supabase access_token + refresh_token
// Use session.provider_session to set the Supabase client session
}}
/>
)
}
That's it. The component handles:
For full Supabase integration (sets the session automatically):
import { FaceGate } from '@facegate/react'
import { createFaceGateSupabaseClient } from '@facegate/supabase'
const supabase = createFaceGateSupabaseClient({
supabaseUrl: 'https://your-project.supabase.co',
supabaseAnonKey: 'your-anon-key',
})
function LoginPage() {
return (
<FaceGate
apiKey="fg_live_your_key"
provider="supabase"
onAuthenticated={async (session) => {
// Sets the Supabase session automatically
await supabase.auth.setSession({
access_token: session.provider_session.access_token,
refresh_token: session.provider_session.refresh_token,
})
// Now use supabase client normally — RLS works
window.location.href = '/dashboard'
}}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your FaceGate API key |
onAuthenticated | (session) => void | required | Called on successful auth |
provider | 'supabase' | 'auth0' | 'firebase' | none | Auth provider for session creation |
providerConfig | Record<string, unknown> | {} | Provider-specific config |
baseUrl | string | https://api.facegate.io | FaceGate server URL |
confidenceThreshold | number | 95 | Minimum match confidence (0-100) |
challengeTimeout | number | 30000 | Liveness timeout in ms |
autoStart | boolean | true | Auto-start on mount |
className | string | none | Container CSS class |
style | CSSProperties | none | Container inline styles |
Build your own UI using the hooks:
import { useFaceGate, useCamera, useLiveness } from '@facegate/react'
function CustomLogin() {
const fg = useFaceGate({
apiKey: 'fg_live_...',
provider: 'supabase',
onAuthenticated: (session) => { /* ... */ },
})
return (
<div>
{fg.mode === 'camera' && <video ref={fg.videoRef} autoPlay playsInline muted />}
{fg.mode === 'qr' && <img src={fg.qrDataUrl} />}
{fg.mode === 'success' && <p>Welcome, {fg.session.user.name}</p>}
{fg.mode === 'error' && <button onClick={fg.retry}>Retry</button>}
</div>
)
}
For partial customization, use individual components:
| Component | Description |
|---|---|
<CameraView> | Video feed + liveness overlay |
<QRView> | QR code display + waiting state |
<LivenessPrompt> | Challenge instruction display |
<PermissionsGate> | Camera permission request UI |
<StatusDisplay> | Loading, success, error states |
The component uses inline styles by default (no CSS import needed). Override with:
<FaceGate
className="my-face-gate"
style={{ maxWidth: '500px', borderRadius: '16px' }}
apiKey="fg_live_..."
onAuthenticated={handleAuth}
/>
Works in all modern browsers with camera API support: Chrome, Firefox, Safari, Edge. On devices without cameras, automatically falls back to QR code.
FAQs
FaceGate React component — face auth in 3 lines of code.
The npm package facegate-react receives a total of 197 weekly downloads. As such, facegate-react popularity was classified as not popular.
We found that facegate-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.