Skip to content

Commit

Permalink
🔒 Disable email auth
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jun 19, 2023
1 parent cec072b commit 00945bf
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions apps/builder/src/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ if (
})
)

if (isNotEmpty(env('SMTP_FROM')) && process.env.SMTP_AUTH_DISABLED !== 'true')
providers.push(
EmailProvider({
server: {
host: process.env.SMTP_HOST,
port: process.env.SMTP_PORT ? Number(process.env.SMTP_PORT) : 25,
secure: process.env.SMTP_SECURE
? process.env.SMTP_SECURE === 'true'
: false,
auth: {
user: process.env.SMTP_USERNAME,
pass: process.env.SMTP_PASSWORD,
},
},
from: env('SMTP_FROM'),
sendVerificationRequest,
})
)
// if (isNotEmpty(env('SMTP_FROM')) && process.env.SMTP_AUTH_DISABLED !== 'true')
// providers.push(
// EmailProvider({
// server: {
// host: process.env.SMTP_HOST,
// port: process.env.SMTP_PORT ? Number(process.env.SMTP_PORT) : 25,
// secure: process.env.SMTP_SECURE
// ? process.env.SMTP_SECURE === 'true'
// : false,
// auth: {
// user: process.env.SMTP_USERNAME,
// pass: process.env.SMTP_PASSWORD,
// },
// },
// from: env('SMTP_FROM'),
// sendVerificationRequest,
// })
// )

if (
isNotEmpty(process.env.GOOGLE_CLIENT_ID) &&
Expand Down

5 comments on commit 00945bf

@vercel
Copy link

@vercel vercel bot commented on 00945bf Jun 19, 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:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io

@luizeof
Copy link

Choose a reason for hiding this comment

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

@baptisteArno Will it no longer be possible to use authentication via smtp in the next version of Typebot?

@baptisteArno
Copy link
Owner Author

Choose a reason for hiding this comment

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

That was just a security measure while the endpoint was being spammed someone! It has been reverted

@luizeof
Copy link

Choose a reason for hiding this comment

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

thanks @baptisteArno. any chance of defining a single global user without smtp? today the vast majority of providers block sending email via smtp.

@baptisteArno
Copy link
Owner Author

Choose a reason for hiding this comment

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

Unfortunately, no way to do that! 😥

You could add another auth method: Github, Gooogle, Gitlab, Azure, Facebook

Please sign in to comment.