diff --git a/src/auth/AuthWrapper.tsx b/src/auth/AuthWrapper.tsx
new file mode 100644
index 0000000..38be1cf
--- /dev/null
+++ b/src/auth/AuthWrapper.tsx
@@ -0,0 +1,79 @@
+import { useAuth } from 'react-oidc-context';
+import { ReactNode } from 'react';
+
+interface AuthWrapperProps {
+ children: ReactNode;
+}
+
+export function AuthWrapper({ children }: AuthWrapperProps) {
+ const auth = useAuth();
+
+ if (auth.isLoading) {
+ return (
+
+ );
+ }
+
+ if (auth.error) {
+ return (
+
+
+
⚠
+
Erro de Autenticação
+
{auth.error.message}
+
+
+
+ );
+ }
+
+ if (!auth.isAuthenticated) {
+ return (
+
+
+
🔐
+
Dashboard EAL
+
Faça login para aceder ao dashboard
+
+
+
+ );
+ }
+
+ return <>{children}>;
+}
+
+export function UserInfo() {
+ const auth = useAuth();
+
+ if (!auth.isAuthenticated) return null;
+
+ return (
+
+
+ {auth.user?.profile?.name || auth.user?.profile?.email}
+
+
+
+ );
+}