feat: auth foundation, similar tools, costs, redundancy, anonymous voting
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user