JSPM

supabase-auth-ui-fr

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22207F
  • License MIT

A React module for Supabase authentication with French UI

Package Exports

  • supabase-auth-ui-fr
  • supabase-auth-ui-fr/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (supabase-auth-ui-fr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Supabase Auth UI FR

Un module React pour l'authentification Supabase avec une interface en français.

Installation

npm install supabase-auth-ui-fr

Utilisation

import { createClient } from '@supabase/supabase-js';
import { AuthProvider, LoginForm, SignUpForm, ProtectedRoute } from 'supabase-auth-ui-fr';

const supabase = createClient(
  process.env.VITE_SUPABASE_URL,
  process.env.VITE_SUPABASE_ANON_KEY
);

const authConfig = {
  supabaseClient: supabase,
  redirects: {
    afterLogin: '/dashboard',
    afterSignUp: '/dashboard',
    whenNotAuthenticated: '/login'
  },
  // Optionnel : personnalisation des textes
  translations: {
    login: {
      title: 'Connexion',
      submitButton: 'Se connecter',
      // ...
    },
    signUp: {
      title: 'Créer un compte',
      submitButton: 'S\'inscrire',
      // ...
    }
  }
};

function App() {
  return (
    <AuthProvider config={authConfig}>
      <Routes>
        <Route path="/login" element={<LoginForm config={authConfig} />} />
        <Route path="/signup" element={<SignUpForm config={authConfig} />} />
        <Route
          path="/dashboard"
          element={
            <ProtectedRoute>
              <Dashboard />
            </ProtectedRoute>
          }
        />
      </Routes>
    </AuthProvider>
  );
}