fix: next-auth production warning for no secret key (#81)

* fix: next-auth production warning for no secret key

Signed-off-by: James <james@jan.ai>

* Fix warning .next folder not exist

---------

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
Co-authored-by: Hien To <>
This commit is contained in:
NamH 2023-09-08 02:24:37 -07:00 committed by GitHub
parent e87a33add5
commit d172d651c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,7 @@ COPY --from=builder /app/public ./public
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # https://nextjs.org/docs/advanced-features/output-file-tracing
# COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json COPY --from=builder /app/package.json ./package.json

View File

@ -34,6 +34,7 @@ export const authOptions = {
issuer: `${process.env.AUTH_ISSUER}`, issuer: `${process.env.AUTH_ISSUER}`,
}), }),
], ],
secret: `${process.env.NEXTAUTH_SECRET}`,
callbacks: { callbacks: {
async jwt({ token, account }) { async jwt({ token, account }) {
const nowTimestamp = Math.floor(Date.now() / 1000); const nowTimestamp = Math.floor(Date.now() / 1000);