Home/Playground/Auth Provider

Auth Provider

← Back to All Components

Component Preview

Clerk Authentication

Secure, feature-rich auth with Clerk

To enable Clerk auth, install @clerk/nextjs and uncomment the imports in this file.

Clerk is an optional dependency in this template

Note: To use Clerk, install @clerk/nextjs package and set up ClerkProvider in your layout.

Description

A unified authentication component that supports multiple providers: Clerk, Supabase, and Firebase

Usage Example

import AuthProvider from '@/app/components/auth/AuthProvider';

export default function MyPage() {
  return (
    <AuthProvider 
      defaultProvider="clerk" // or "supabase" or "firebase"
      redirectUrl="/dashboard"
      onSuccess={(user) => console.log('Signed in:', user)}
      buttonOnly={false}
    />
  );
}