diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6ad8a3b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:16-alpine +#RUN kill -9 sudo lsof -t -i:8000 +WORKDIR /app +COPY package.json ./ +RUN rm -rf node_moduls +RUN npm i +COPY . . +RUN npm cache clean --force +CMD [ "npm", "start" ] + +# docker build -t webauthn . +# docker tag docker.io/library/webauthn docker tag docker.io/library/webauthn 668004263903.dkr.ecr.ap-south-1.amazonaws.com/credebl2.0:webauthn \ No newline at end of file diff --git a/index.ts b/index.ts index a60b1ac..13f241d 100644 --- a/index.ts +++ b/index.ts @@ -43,7 +43,7 @@ dotenv.config(); const app = express(); const MemoryStore = memoryStore(session); -const { ENABLE_CONFORMANCE, ENABLE_HTTPS, RP_ID = 'localhost' } = process.env; +const { ENABLE_CONFORMANCE, ENABLE_HTTPS, RP_ID = 'dev.credebl.id' } = process.env; app.use(cors()); app.use(express.static('./public/')); app.use(express.json()); @@ -82,7 +82,7 @@ export const rpID = RP_ID; // This value is set at the bottom of page as part of server initialization (the empty string is // to appease TypeScript until we determine the expected origin based on whether or not HTTPS // support is enabled) -export const expectedOrigin = 'http://localhost:3000'; +export const expectedOrigin = 'https://dev.credebl.id'; /** * 2FA and Passwordless WebAuthn flows expect you to be able to uniquely identify the user that