mirror of
https://github.com/aljazceru/enclava.git
synced 2025-12-17 07:24:34 +01:00
prod build fixing
This commit is contained in:
@@ -23,6 +23,8 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# Build the application using npm only
|
# Build the application using npm only
|
||||||
|
RUN npm install
|
||||||
|
RUN npm install autoprefixer
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
# Production image, copy all the files and run next
|
||||||
|
|||||||
1807
frontend/package-lock.json
generated
1807
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,6 @@
|
|||||||
"@types/node": "^20.10.0",
|
"@types/node": "^20.10.0",
|
||||||
"@types/react": "^18.2.39",
|
"@types/react": "^18.2.39",
|
||||||
"@types/react-dom": "^18.2.17",
|
"@types/react-dom": "^18.2.17",
|
||||||
"autoprefixer": "^10.4.16",
|
|
||||||
"eslint": "^8.54.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-config-next": "14.0.4",
|
"eslint-config-next": "14.0.4",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.32",
|
||||||
|
|||||||
@@ -26,16 +26,18 @@ export default function TestAuthPage() {
|
|||||||
const getTokenInfo = () => {
|
const getTokenInfo = () => {
|
||||||
const expiry = tokenManager.getTokenExpiry()
|
const expiry = tokenManager.getTokenExpiry()
|
||||||
const refreshExpiry = tokenManager.getRefreshTokenExpiry()
|
const refreshExpiry = tokenManager.getRefreshTokenExpiry()
|
||||||
|
|
||||||
if (!expiry) return "No token"
|
if (!expiry.access_token_expiry) return "No token"
|
||||||
|
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
const timeUntilExpiry = Math.floor((expiry.getTime() - now.getTime()) / 1000)
|
const accessTimeUntilExpiry = Math.floor((expiry.access_token_expiry - now.getTime() / 1000))
|
||||||
|
const refreshTimeUntilExpiry = refreshExpiry ? Math.floor((refreshExpiry - now.getTime() / 1000)) : null
|
||||||
|
|
||||||
return `
|
return `
|
||||||
Token expires in: ${Math.floor(timeUntilExpiry / 60)} minutes ${timeUntilExpiry % 60} seconds
|
Access token expires in: ${Math.floor(accessTimeUntilExpiry / 60)} minutes ${accessTimeUntilExpiry % 60} seconds
|
||||||
Access token expiry: ${expiry.toLocaleString()}
|
Refresh token expires in: ${refreshTimeUntilExpiry ? `${Math.floor(refreshTimeUntilExpiry / 60)} minutes ${refreshTimeUntilExpiry % 60} seconds` : 'N/A'}
|
||||||
Refresh token expiry: ${refreshExpiry?.toLocaleString() || 'N/A'}
|
Access token expiry: ${new Date(expiry.access_token_expiry * 1000).toLocaleString()}
|
||||||
|
Refresh token expiry: ${refreshExpiry ? new Date(refreshExpiry * 1000).toLocaleString() : 'N/A'}
|
||||||
Authenticated: ${tokenManager.isAuthenticated()}
|
Authenticated: ${tokenManager.isAuthenticated()}
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user