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-frUtilisation
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>
);
}