Add admin dashboard and Replit authentication integration

Integrates Replit authentication using OpenID Connect, adds an admin dashboard route with video management and thumbnail upload capabilities, and updates dependencies.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 890577b1-c154-40a4-a177-a0c6d55320c3
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/890577b1-c154-40a4-a177-a0c6d55320c3/1jMBtLj
This commit is contained in:
sebastjanartic
2025-09-02 12:01:00 +00:00
parent 12df511504
commit c71720454f
12 changed files with 975 additions and 31 deletions
+16
View File
@@ -0,0 +1,16 @@
import { useQuery } from "@tanstack/react-query";
export function useAuth() {
const { data: user, isLoading } = useQuery({
queryKey: ["/api/auth/user"],
retry: false,
});
return {
user,
isLoading,
isAuthenticated: !!user,
isAdmin: user?.isAdmin || false,
isSuperAdmin: user?.isSuperAdmin || false,
};
}