From 59b7636c60ba8637607078b2b7f39a49847effbc Mon Sep 17 00:00:00 2001 From: lumijiez <59575049+lumijiez@users.noreply.github.com> Date: Wed, 4 Jun 2025 18:03:21 +0300 Subject: [PATCH] Display auth data, fix login container --- docker-compose.yml | 8 +- webui/auth0-templates/login.html | 4 +- webui/src/app/page.js | 185 +++++++++++++++++++++++++++++-- webui/src/lib/auth0.js | 2 +- 4 files changed, 186 insertions(+), 13 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e87110c..054a2ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,8 +21,9 @@ services: working_dir: /app volumes: - ./webui:/app - expose: - - "3000" + - /app/node_modules + ports: + - "3000:3000" environment: - NODE_ENV=development - AUTH0_SECRET=${AUTH0_SECRET} @@ -35,10 +36,11 @@ services: - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} - NEXT_PUBLIC_AUTH0_CLIENT_ID=${NEXT_PUBLIC_AUTH0_CLIENT_ID} - NEXT_PUBLIC_AUTH0_DOMAIN=${NEXT_PUBLIC_AUTH0_DOMAIN} - command: "sh -c 'npm install && npm run dev'" + command: sh -c "npm install && npm run dev" networks: - app-network + mssql: image: mcr.microsoft.com/mssql/server:2022-latest container_name: sqlserver diff --git a/webui/auth0-templates/login.html b/webui/auth0-templates/login.html index aab1df5..0219257 100644 --- a/webui/auth0-templates/login.html +++ b/webui/auth0-templates/login.html @@ -61,7 +61,7 @@ display: flex; align-items: center; justify-content: center; - animation: slideLeft 1s ease-out; + animation: slideLeft 0.5s cubic-bezier(0.77, 0, 0.175, 1); position: relative; z-index: 0; } @@ -76,7 +76,7 @@ display: flex; align-items: center; justify-content: center; - animation: slideRight 1s ease-out; + animation: slideRight 0.5s cubic-bezier(0.77, 0, 0.175, 1); position: relative; z-index: 1; } diff --git a/webui/src/app/page.js b/webui/src/app/page.js index af50faf..5c582f4 100644 --- a/webui/src/app/page.js +++ b/webui/src/app/page.js @@ -1,9 +1,180 @@ -import Image from "next/image"; +'use client'; + +import { useUser } from "@auth0/nextjs-auth0"; +import {useEffect, useState} from "react"; export default function Home() { - return ( -
+ {JSON.stringify(user, null, 2)}
+
+