1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules/*
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM node:18 AS Build
|
||||||
|
WORKDIR /app/node/
|
||||||
|
COPY . .
|
||||||
|
RUN yarn
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM nginx AS Production
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
COPY --from=Build /app/node/dist /usr/share/nginx/html/
|
@ -2,7 +2,7 @@ import totp from 'totp-generator'
|
|||||||
const period = 30
|
const period = 30
|
||||||
const digits = 6
|
const digits = 6
|
||||||
|
|
||||||
export function displayToken(secret) {
|
export function displayToken(secret: string) {
|
||||||
const token = totp(secret.replace(/ /g, '').trim(), {
|
const token = totp(secret.replace(/ /g, '').trim(), {
|
||||||
digits,
|
digits,
|
||||||
period,
|
period,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayTokenListItem } from "./TokenListItem";
|
import { displayTokenListItem } from "./tokenListItem";
|
||||||
import { tokens } from "./tokens";
|
import { tokens } from "./tokens";
|
||||||
|
|
||||||
export function tokenList() {
|
export function tokenList() {
|
||||||
|
20
tsconfig.json
Normal file
20
tsconfig.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ESNext",
|
||||||
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
|
"types": [],
|
||||||
|
"allowJs": false,
|
||||||
|
"skipLibCheck": false,
|
||||||
|
"esModuleInterop": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"strict": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"jsx": "react"
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
Reference in New Issue
Block a user