feat: Enable host trust for authentication and update example environment configuration
- Set AUTH_TRUST_HOST to true in env.example for improved security. - Updated NextAuth configuration to trust the host during authentication.
This commit is contained in:
parent
af2faf8f41
commit
888ffef8e3
@ -4,6 +4,7 @@ DATABASE_URL="postgresql://user:password@localhost:5432/mirrormatch?schema=publi
|
||||
# NextAuth
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
NEXTAUTH_SECRET="your-secret-key-here-generate-with-openssl-rand-base64-32"
|
||||
AUTH_TRUST_HOST=true
|
||||
|
||||
# Email Configuration (for production)
|
||||
SMTP_HOST="smtp.example.com"
|
||||
|
||||
@ -9,6 +9,7 @@ if (!nextAuthSecret) {
|
||||
}
|
||||
|
||||
export const { handlers, auth, signIn, signOut } = NextAuth({
|
||||
trustHost: true,
|
||||
providers: [
|
||||
Credentials({
|
||||
name: "Credentials",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user