From 89e7d00fe0009e8df526cbdefc8e6e38b2a1163d Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 8 Feb 2024 19:05:46 +0530 Subject: [PATCH 1/2] fix: golang smtp update --- v2/emailpassword/email-delivery/smtp/configure-smtp.mdx | 9 ++++++++- v2/passwordless/email-delivery/smtp/configure-smtp.mdx | 2 +- v2/src/plugins/codeTypeChecking/goEnv/go.mod | 2 +- v2/src/plugins/codeTypeChecking/goEnv/go.sum | 4 ++-- v2/thirdparty/email-delivery/smtp/configure-smtp.mdx | 2 +- .../email-delivery/smtp/configure-smtp.mdx | 9 ++++++++- .../email-delivery/smtp/configure-smtp.mdx | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx index 49b78a083..f8fd518ff 100644 --- a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx @@ -81,6 +81,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification" "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -92,10 +94,15 @@ func main() { Name: "...", Email: "...", }, - Port: 456, + Port: 465, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx index 80f1100d9..cb3877a80 100644 --- a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx @@ -79,7 +79,7 @@ func main() { Name: "...", Email: "...", }, - Port: 456, + Port: 465, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.mod b/v2/src/plugins/codeTypeChecking/goEnv/go.mod index 3ce2a8f7a..4fa36f044 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.mod +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-chi/cors v1.2.1 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 - github.com/supertokens/supertokens-golang v0.17.1 + github.com/supertokens/supertokens-golang v0.17.4 ) require ( diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.sum b/v2/src/plugins/codeTypeChecking/goEnv/go.sum index b83db4c58..d8f07a6e3 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.sum +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.sum @@ -95,8 +95,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/supertokens/supertokens-golang v0.17.1 h1:uuYmYio7+T4HmrqyVfxUAmdMTcIsYRIBTod+h/DFW0Q= -github.com/supertokens/supertokens-golang v0.17.1/go.mod h1:/n6zQ9461RscnnWB4Y4bWwzhPivnj8w79j/doqkLOs8= +github.com/supertokens/supertokens-golang v0.17.4 h1:G5FngSJpGjlLG/t+xQtVnq0XkMjhAkZivmmEwgZ2gD4= +github.com/supertokens/supertokens-golang v0.17.4/go.mod h1:/n6zQ9461RscnnWB4Y4bWwzhPivnj8w79j/doqkLOs8= github.com/twilio/twilio-go v0.26.0 h1:wFW4oTe3/LKt6bvByP7eio8JsjtaLHjMQKOUEzQry7U= github.com/twilio/twilio-go v0.26.0/go.mod h1:lz62Hopu4vicpQ056H5TJ0JE4AP0rS3sQ35/ejmgOwE= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= diff --git a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx index 9bb6580f1..bab06d9ff 100644 --- a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx @@ -81,7 +81,7 @@ func main() { Name: "...", Email: "...", }, - Port: 456, + Port: 465, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, diff --git a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx index 45a8868dc..44714b4ba 100644 --- a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx @@ -81,6 +81,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification" "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -92,10 +94,15 @@ func main() { Name: "...", Email: "...", }, - Port: 456, + Port: 465, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx index cb2d049d8..db672e6e9 100644 --- a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx @@ -89,7 +89,7 @@ func main() { Name: "...", Email: "...", }, - Port: 456, + Port: 465, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, From b08052742020ba7fc4e0c0fb6e129c2b6a9ca9ab Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 8 Feb 2024 19:16:13 +0530 Subject: [PATCH 2/2] fix: smtp golang --- .../email-delivery/smtp/configure-smtp.mdx | 13 +++++++------ .../email-delivery/smtp/configure-smtp.mdx | 8 ++++++++ .../email-delivery/smtp/configure-smtp.mdx | 10 +++++++++- .../email-delivery/smtp/configure-smtp.mdx | 13 +++++++------ .../email-delivery/smtp/configure-smtp.mdx | 8 ++++++++ 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx index f8fd518ff..5c4080074 100644 --- a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx @@ -82,7 +82,7 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" - "crypto/tls" + "crypto/tls" ) func main() { @@ -98,11 +98,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, - // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS - // if not provided, the SDK will use a default config - TLSConfig: &tls.Config{ - // ... - }, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx index cb3877a80..8db2391cd 100644 --- a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx @@ -62,6 +62,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/passwordless" "github.com/supertokens/supertokens-golang/recipe/passwordless/plessmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -83,6 +85,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, }, }), }, diff --git a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx index bab06d9ff..22f9c0c16 100644 --- a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx @@ -70,6 +70,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification" "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -81,10 +83,16 @@ func main() { Name: "...", Email: "...", }, - Port: 465, + Port: 456, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx index 44714b4ba..e362a328e 100644 --- a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx @@ -82,7 +82,7 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" - "crypto/tls" + "crypto/tls" ) func main() { @@ -98,11 +98,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, - // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS - // if not provided, the SDK will use a default config - TLSConfig: &tls.Config{ - // ... - }, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx index db672e6e9..263f157e2 100644 --- a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx @@ -78,6 +78,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless" "github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless/tplmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -93,6 +95,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end