Skip to content

Commit

Permalink
Use a .env.development file
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmytton committed Apr 2, 2024
1 parent da5d1ac commit 8cb4736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/nextjs-14-authjs-5/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Used in dev and CI
AUTH_SECRET=9cf7510df73de5a0b1129d1d3eead6c4
4 changes: 1 addition & 3 deletions examples/nextjs-14-authjs-5/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ export const config = {
return token
},
},
// This prevents the secret being empty during builds
secret: process.env.CI ? "CI_SECRET" : process.env.AUTH_SECRET,
} satisfies NextAuthConfig
satisfies NextAuthConfig

export const { handlers, auth, signIn, signOut } = NextAuth(config)

0 comments on commit 8cb4736

Please sign in to comment.