Skip to content

Commit

Permalink
fix: default EMAIL_USE_SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
okisdev committed Aug 4, 2023
1 parent b0a970a commit 54e1cdd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ https://github.com/users/okisdev/projects/7 をご参照ください
| `NEXTAUTH_SECRET` | NextAuth Secret | | **Yes** | ランダムハッシュ(16 ビットが最適) |
| `EMAIL_HOST` | SMTP ホスト | | No | |
| `EMAIL_PORT` | SMTP ポート | | No | |
| `EMAIL_USE_SSL` | SMTP SSL | true | No | |
| `EMAIL_USERNAME` | SMTP ユーザ名 | | No | |
| `EMAIL_PASSWORD` | SMTP パスワード | | No | |
| `EMAIL_FROM` | SMTP 送信アドレス | | No | |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ Please refer to https://github.com/users/okisdev/projects/7

### Environment variables

| variable name | description | default | mandatory | prompt |
| variable name | description | default | mandatory | tips |
| ----------------- | --------------------------- | ------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
| `DATABASE_URL` | Postgresql database address | | **Yes** | Start with `postgresql://` (if not required, please fill in `postgresql://user:[email protected]:port/dbname`) |
| `NEXTAUTH_URL` | Your website URL | | **Yes** | (with prefix) |
| `NEXTAUTH_SECRET` | NextAuth Secret | | **Yes** | Random hash (16 bits is best) |
| `EMAIL_HOST` | SMTP Host | | No | |
| `EMAIL_PORT` | SMTP Port | | No | |
| `EMAIL_USE_SSL` | SMTP SSL | true | No | |
| `EMAIL_USERNAME` | SMTP username | | No | |
| `EMAIL_PASSWORD` | SMTP password | | No | |
| `EMAIL_FROM` | SMTP sending address | | No | |
Expand Down
1 change: 1 addition & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ https://user-images.githubusercontent.com/66008528/235539163-35f7ee91-e357-453a-
| `NEXTAUTH_SECRET` | NextAuth Secret | | **Yes** | 随机哈希数值(16 位最佳) |
| `EMAIL_HOST` | SMTP Host | | No | |
| `EMAIL_PORT` | SMTP Port | | No | |
| `EMAIL_USE_SSL` | SMTP SSL | true | No | |
| `EMAIL_USERNAME` | SMTP username | | No | |
| `EMAIL_PASSWORD` | SMTP password | | No | |
| `EMAIL_FROM` | SMTP 发送地址 | | No | |
Expand Down
1 change: 1 addition & 0 deletions README.zh_HK.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ https://user-images.githubusercontent.com/66008528/235539163-35f7ee91-e357-453a-
| `NEXTAUTH_SECRET` | NextAuth Secret | | **Yes** | 隨機哈希數值(16 位最佳) |
| `EMAIL_HOST` | SMTP Host | | No | |
| `EMAIL_PORT` | SMTP Port | | No | |
| `EMAIL_USE_SSL` | SMTP SSL | true | No | |
| `EMAIL_USERNAME` | SMTP username | | No | |
| `EMAIL_PASSWORD` | SMTP password | | No | |
| `EMAIL_FROM` | SMTP 發送地址 | | No | |
Expand Down
2 changes: 1 addition & 1 deletion lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const authOptions: NextAuthOptions = {
server: {
host: process.env.EMAIL_HOST,
port: Number(process.env.EMAIL_PORT) || 587,
secure: process.env.EMAIL_USE_SSL,
secure: process.env.EMAIL_USE_SSL ?? true,
auth: {
user: process.env.EMAIL_USERNAME,
pass: process.env.EMAIL_PASSWORD,
Expand Down

1 comment on commit 54e1cdd

@vercel
Copy link

@vercel vercel bot commented on 54e1cdd Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chat-chat – ./

chat-chat-okisdev.vercel.app
chatchat-main.vercel.app
chat-chat-git-main-okisdev.vercel.app

Please sign in to comment.