refactored Authentication

This commit is contained in:
2026-02-17 16:51:47 +00:00
parent 13e8866875
commit d32d0f5c03
45 changed files with 1322 additions and 66 deletions
@@ -16,11 +16,6 @@ export const useAuth = (props: UseAuthProps = {}) => {
const apiClient = useClient(apiUrl);
const passKeyManager = usePasskeys();
const { data: setupData } = useQuery({
queryKey: ['AUTH_SETUP'],
queryFn: () => apiClient.get<{ registrationOpen: boolean }>('/server-settings'),
});
const registrationOpen = setupData?.registrationOpen ?? false;
const { isLoading } = useQuery<UserWithToken | null>({
queryKey: ['CURRENT_USER'],
@@ -115,7 +110,6 @@ export const useAuth = (props: UseAuthProps = {}) => {
user,
isAuthenticated: !!user,
isLoading,
registrationOpen,
refreshUser,
signin,
signout,