feat: auth foundation, similar tools, costs, redundancy, anonymous voting

This commit is contained in:
root
2026-07-29 21:59:29 +02:00
parent 8b3b7c9955
commit 59badeaa48
22 changed files with 793 additions and 15 deletions
+2
View File
@@ -20,6 +20,7 @@ export function useAuth() {
const isAuthenticated = !!user && !error;
const isAdmin = isAuthenticated && user?.role === "admin";
const isLocalMode = authMode?.mode === "local";
const tier = isAuthenticated ? user?.tier ?? "free" : "free";
function login(returnTo?: string) {
if (isLocalMode) {
@@ -45,6 +46,7 @@ export function useAuth() {
isAuthenticated,
isAdmin,
isLocalMode,
tier,
login,
logout,
};