Skip to content

Commit 55fc4b2

Browse files
committed
Update resend otp
1 parent fac333e commit 55fc4b2

File tree

20 files changed

+162
-130
lines changed

20 files changed

+162
-130
lines changed

.env.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ SMTP_PORT=2525
77
SMTP_USERNAME=test
88
SMTP_PASSWORD=test
99
SENDER_EMAIL="[email protected]"
10+
TWILIO_API_KEY=test
11+
TWILIO_API_SECRET=test
12+
TWILIO_ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
13+
TWILIO_SENDER=909921212112
1014
SENDER_NAME="Authorizer"
1115
AWS_REGION=ap-south-1

server/constants/env.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const (
6666
EnvKeySenderName = "SENDER_NAME"
6767
// EnvKeyIsEmailServiceEnabled key for env variable IS_EMAIL_SERVICE_ENABLED
6868
EnvKeyIsEmailServiceEnabled = "IS_EMAIL_SERVICE_ENABLED"
69+
// EnvKeyIsSMSServiceEnabled key for env variable IS_SMS_SERVICE_ENABLED
70+
EnvKeyIsSMSServiceEnabled = "IS_SMS_SERVICE_ENABLED"
6971
// EnvKeyAppCookieSecure key for env variable APP_COOKIE_SECURE
7072
EnvKeyAppCookieSecure = "APP_COOKIE_SECURE"
7173
// EnvKeyAdminCookieSecure key for env variable ADMIN_COOKIE_SECURE
@@ -158,6 +160,9 @@ const (
158160
// EnvKeyDisableMultiFactorAuthentication is key for env variable DISABLE_MULTI_FACTOR_AUTHENTICATION
159161
// this variable is used to completely disable multi factor authentication. It will have no effect on profile preference
160162
EnvKeyDisableMultiFactorAuthentication = "DISABLE_MULTI_FACTOR_AUTHENTICATION"
163+
// EnvKeyDisablePhoneVerification is key for env variable DISABLE_PHONE_VERIFICATION
164+
// this variable is used to disable phone verification
165+
EnvKeyDisablePhoneVerification = "DISABLE_PHONE_VERIFICATION"
161166

162167
// Slice variables
163168
// EnvKeyRoles key for env variable ROLES
@@ -177,17 +182,13 @@ const (
177182
// This env is used for setting default response mode in authorize handler
178183
EnvKeyDefaultAuthorizeResponseMode = "DEFAULT_AUTHORIZE_RESPONSE_MODE"
179184

180-
// Phone verification setting
181-
EnvKeyDisablePhoneVerification = "DISABLE_PHONE_VERIFICATION"
182-
183185
// Twilio env variables
184-
185186
// EnvKeyTwilioAPIKey key for env variable TWILIO_API_KEY
186187
EnvKeyTwilioAPIKey = "TWILIO_API_KEY"
187188
// EnvKeyTwilioAPISecret key for env variable TWILIO_API_SECRET
188189
EnvKeyTwilioAPISecret = "TWILIO_API_SECRET"
189190
// EnvKeyTwilioAccountSID key for env variable TWILIO_ACCOUNT_SID
190191
EnvKeyTwilioAccountSID = "TWILIO_ACCOUNT_SID"
191-
// EnvKeyTwilioSenderFrom key for env variable TWILIO_SENDER_FROM
192-
EnvKeyTwilioSenderFrom = "TWILIO_SENDER_FROM"
192+
// EnvKeyTwilioSender key for env variable TWILIO_SENDER
193+
EnvKeyTwilioSender = "TWILIO_SENDER"
193194
)

server/env/env.go

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,19 @@ func InitAllEnv() error {
104104
osDisableStrongPassword := os.Getenv(constants.EnvKeyDisableStrongPassword)
105105
osEnforceMultiFactorAuthentication := os.Getenv(constants.EnvKeyEnforceMultiFactorAuthentication)
106106
osDisableMultiFactorAuthentication := os.Getenv(constants.EnvKeyDisableMultiFactorAuthentication)
107-
108-
// os slice vars
109-
osAllowedOrigins := os.Getenv(constants.EnvKeyAllowedOrigins)
110-
osRoles := os.Getenv(constants.EnvKeyRoles)
111-
osDefaultRoles := os.Getenv(constants.EnvKeyDefaultRoles)
112-
osProtectedRoles := os.Getenv(constants.EnvKeyProtectedRoles)
113-
114107
// phone verification var
115108
osDisablePhoneVerification := os.Getenv(constants.EnvKeyDisablePhoneVerification)
116-
117109
// twilio vars
118110
osTwilioApiKey := os.Getenv(constants.EnvKeyTwilioAPIKey)
119111
osTwilioApiSecret := os.Getenv(constants.EnvKeyTwilioAPISecret)
120112
osTwilioAccountSid := os.Getenv(constants.EnvKeyTwilioAccountSID)
121-
osTwilioSenderFrom := os.Getenv(constants.EnvKeyTwilioSenderFrom)
113+
osTwilioSender := os.Getenv(constants.EnvKeyTwilioSender)
114+
115+
// os slice vars
116+
osAllowedOrigins := os.Getenv(constants.EnvKeyAllowedOrigins)
117+
osRoles := os.Getenv(constants.EnvKeyRoles)
118+
osDefaultRoles := os.Getenv(constants.EnvKeyDefaultRoles)
119+
osProtectedRoles := os.Getenv(constants.EnvKeyProtectedRoles)
122120

123121
ienv, ok := envData[constants.EnvKeyEnv]
124122
if !ok || ienv == "" {
@@ -145,7 +143,7 @@ func InitAllEnv() error {
145143
if val, ok := envData[constants.EnvAwsRegion]; !ok || val == "" {
146144
envData[constants.EnvAwsRegion] = osAwsRegion
147145
}
148-
146+
149147
if osAwsRegion != "" && envData[constants.EnvAwsRegion] != osAwsRegion {
150148
envData[constants.EnvAwsRegion] = osAwsRegion
151149
}
@@ -691,11 +689,11 @@ func InitAllEnv() error {
691689
envData[constants.EnvKeyIsEmailServiceEnabled] = false
692690
}
693691

694-
if envData[constants.EnvKeySmtpHost] != "" || envData[constants.EnvKeySmtpUsername] != "" || envData[constants.EnvKeySmtpPassword] != "" || envData[constants.EnvKeySenderEmail] != "" && envData[constants.EnvKeySmtpPort] != "" {
692+
if envData[constants.EnvKeySmtpHost] != "" && envData[constants.EnvKeySmtpUsername] != "" && envData[constants.EnvKeySmtpPassword] != "" && envData[constants.EnvKeySenderEmail] != "" && envData[constants.EnvKeySmtpPort] != "" {
695693
envData[constants.EnvKeyIsEmailServiceEnabled] = true
696694
}
697695

698-
if envData[constants.EnvKeyEnforceMultiFactorAuthentication].(bool) && !envData[constants.EnvKeyIsEmailServiceEnabled].(bool) {
696+
if envData[constants.EnvKeyEnforceMultiFactorAuthentication].(bool) && !envData[constants.EnvKeyIsEmailServiceEnabled].(bool) && !envData[constants.EnvKeyIsSMSServiceEnabled].(bool) {
699697
return errors.New("to enable multi factor authentication, please enable email service")
700698
}
701699

@@ -777,29 +775,39 @@ func InitAllEnv() error {
777775
envData[constants.EnvKeyDefaultAuthorizeResponseMode] = osAuthorizeResponseMode
778776
}
779777

778+
if val, ok := envData[constants.EnvKeyTwilioAPISecret]; !ok || val == "" {
779+
envData[constants.EnvKeyTwilioAPISecret] = osTwilioApiSecret
780+
}
780781
if osTwilioApiSecret != "" && envData[constants.EnvKeyTwilioAPISecret] != osTwilioApiSecret {
781782
envData[constants.EnvKeyTwilioAPISecret] = osTwilioApiSecret
782783
}
783784

785+
if val, ok := envData[constants.EnvKeyTwilioAPIKey]; !ok || val == "" {
786+
envData[constants.EnvKeyTwilioAPIKey] = osTwilioApiKey
787+
}
784788
if osTwilioApiKey != "" && envData[constants.EnvKeyTwilioAPIKey] != osTwilioApiKey {
785789
envData[constants.EnvKeyTwilioAPIKey] = osTwilioApiKey
786790
}
787791

792+
if val, ok := envData[constants.EnvKeyTwilioAccountSID]; !ok || val == "" {
793+
envData[constants.EnvKeyTwilioAccountSID] = osTwilioAccountSid
794+
}
788795
if osTwilioAccountSid != "" && envData[constants.EnvKeyTwilioAccountSID] != osTwilioAccountSid {
789796
envData[constants.EnvKeyTwilioAccountSID] = osTwilioAccountSid
790797
}
791798

792-
if osTwilioSenderFrom != "" && envData[constants.EnvKeyTwilioSenderFrom] != osTwilioSenderFrom {
793-
envData[constants.EnvKeyTwilioSenderFrom] = osTwilioSenderFrom
799+
if val, ok := envData[constants.EnvKeyTwilioSender]; !ok || val == "" {
800+
envData[constants.EnvKeyTwilioSender] = osTwilioSender
801+
}
802+
if osTwilioSender != "" && envData[constants.EnvKeyTwilioSender] != osTwilioSender {
803+
envData[constants.EnvKeyTwilioSender] = osTwilioSender
794804
}
795805

796806
if _, ok := envData[constants.EnvKeyDisablePhoneVerification]; !ok {
797807
envData[constants.EnvKeyDisablePhoneVerification] = osDisablePhoneVerification == "false"
798808
}
799-
800809
if osDisablePhoneVerification != "" {
801810
boolValue, err := strconv.ParseBool(osDisablePhoneVerification)
802-
803811
if err != nil {
804812
return err
805813
}
@@ -808,6 +816,15 @@ func InitAllEnv() error {
808816
}
809817
}
810818

819+
if envData[constants.EnvKeyTwilioAPIKey] == "" || envData[constants.EnvKeyTwilioAPISecret] == "" || envData[constants.EnvKeyTwilioAccountSID] == "" || envData[constants.EnvKeyTwilioSender] == "" {
820+
envData[constants.EnvKeyDisablePhoneVerification] = true
821+
envData[constants.EnvKeyIsSMSServiceEnabled] = false
822+
}
823+
if envData[constants.EnvKeyTwilioAPIKey] != "" && envData[constants.EnvKeyTwilioAPISecret] != "" && envData[constants.EnvKeyTwilioAccountSID] != "" && envData[constants.EnvKeyTwilioSender] != "" {
824+
envData[constants.EnvKeyDisablePhoneVerification] = false
825+
envData[constants.EnvKeyIsSMSServiceEnabled] = true
826+
}
827+
811828
err = memorystore.Provider.UpdateEnvStore(envData)
812829
if err != nil {
813830
log.Debug("Error while updating env store: ", err)

server/env/persist_env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func PersistEnv() error {
200200
envValue := strings.TrimSpace(os.Getenv(key))
201201
if envValue != "" {
202202
switch key {
203-
case constants.EnvKeyIsProd, constants.EnvKeyDisableBasicAuthentication, constants.EnvKeyDisableMobileBasicAuthentication, constants.EnvKeyDisableEmailVerification, constants.EnvKeyDisableLoginPage, constants.EnvKeyDisableMagicLinkLogin, constants.EnvKeyDisableSignUp, constants.EnvKeyDisableRedisForEnv, constants.EnvKeyDisableStrongPassword, constants.EnvKeyIsEmailServiceEnabled, constants.EnvKeyEnforceMultiFactorAuthentication, constants.EnvKeyDisableMultiFactorAuthentication, constants.EnvKeyAdminCookieSecure, constants.EnvKeyAppCookieSecure, constants.EnvKeyDisablePhoneVerification:
203+
case constants.EnvKeyIsProd, constants.EnvKeyDisableBasicAuthentication, constants.EnvKeyDisableMobileBasicAuthentication, constants.EnvKeyDisableEmailVerification, constants.EnvKeyDisableLoginPage, constants.EnvKeyDisableMagicLinkLogin, constants.EnvKeyDisableSignUp, constants.EnvKeyDisableRedisForEnv, constants.EnvKeyDisableStrongPassword, constants.EnvKeyIsEmailServiceEnabled, constants.EnvKeyIsSMSServiceEnabled, constants.EnvKeyEnforceMultiFactorAuthentication, constants.EnvKeyDisableMultiFactorAuthentication, constants.EnvKeyAdminCookieSecure, constants.EnvKeyAppCookieSecure, constants.EnvKeyDisablePhoneVerification:
204204
if envValueBool, err := strconv.ParseBool(envValue); err == nil {
205205
if value.(bool) != envValueBool {
206206
storeData[key] = envValueBool

server/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ require (
1313
github.com/go-playground/validator/v10 v10.11.1 // indirect
1414
github.com/goccy/go-json v0.9.11 // indirect
1515
github.com/gocql/gocql v1.2.0
16-
github.com/gofrs/uuid v4.2.0+incompatible // indirect
1716
github.com/golang-jwt/jwt v3.2.2+incompatible
1817
github.com/golang/protobuf v1.5.2 // indirect
1918
github.com/google/go-cmp v0.5.6 // indirect

server/go.sum

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e h1:Xg+hGrY2
5151
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e/go.mod h1:mq7Shfa/CaixoDxiyAAc5jZ6CVBAyPaNQCGS7mkj4Ho=
5252
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
5353
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
54-
github.com/aws/aws-sdk-go v1.42.47/go.mod h1:OGr6lGMAKGlG9CVrYnWYDKIyb829c6EVBRjxqjmPepc=
55-
github.com/aws/aws-sdk-go v1.44.109 h1:+Na5JPeS0kiEHoBp5Umcuuf+IDqXqD0lXnM920E31YI=
56-
github.com/aws/aws-sdk-go v1.44.109/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
5754
github.com/aws/aws-sdk-go v1.44.298 h1:5qTxdubgV7PptZJmp/2qDwD2JL187ePL7VOxsSh1i3g=
5855
github.com/aws/aws-sdk-go v1.44.298/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
5956
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
@@ -65,8 +62,6 @@ github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
6562
github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
6663
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
6764
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
68-
github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
69-
github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
7065
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
7166
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
7267
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -134,8 +129,6 @@ github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
134129
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
135130
github.com/gocql/gocql v1.2.0 h1:TZhsCd7fRuye4VyHr3WCvWwIQaZUmjsqnSIXK9FcVCE=
136131
github.com/gocql/gocql v1.2.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8=
137-
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
138-
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
139132
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
140133
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
141134
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
@@ -210,8 +203,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
210203
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
211204
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
212205
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
213-
github.com/guregu/dynamo v1.16.0 h1:gmI8oi1VHwYQtq7+RPBeOiSssVLgxH/Az2t+NtDtL2c=
214-
github.com/guregu/dynamo v1.16.0/go.mod h1:W2Gqcf3MtkrS+Q6fHPGAmRtT0Dyq+TGrqfqrUC9+R/c=
215206
github.com/guregu/dynamo v1.20.0 h1:PDdVVhRSXQFFIHlkhoKF6D8kiwI9IU6uUdz/fF6Iiy4=
216207
github.com/guregu/dynamo v1.20.0/go.mod h1:YQ92BTYVSMIKpFEzhaVqmCJnnSIGxbNF5zvECUaEZRE=
217208
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
@@ -444,12 +435,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
444435
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
445436
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
446437
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
447-
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
448-
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
449438
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
450439
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
451440
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
452-
golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk=
453441
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
454442
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
455443
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
@@ -471,7 +459,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
471459
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
472460
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
473461
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
474-
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 h1:ZrnxWX62AgTKOSagEqxvb3ffipvEDX2pl7E1TdqLqIc=
475462
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
476463
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
477464
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
@@ -520,7 +507,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
520507
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
521508
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
522509
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
523-
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
524510
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
525511
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
526512
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -540,7 +526,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
540526
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
541527
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
542528
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
543-
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
544529
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
545530
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
546531
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=

server/graph/generated/generated.go

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/graph/model/models_gen.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/graph/schema.graphqls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ input VerifyOTPRequest {
549549
}
550550

551551
input ResendOTPRequest {
552-
email: String!
552+
email: String
553+
phone_number: String
553554
# state is used for authorization code grant flow
554555
# it is used to get code for an on-going auth process during login
555556
# and use that code for setting `c_hash` in id_token

server/memorystore/memory_store.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func InitMemStore() error {
3333
constants.EnvKeyDisableSignUp: false,
3434
constants.EnvKeyDisableStrongPassword: false,
3535
constants.EnvKeyIsEmailServiceEnabled: false,
36+
constants.EnvKeyIsSMSServiceEnabled: false,
3637
constants.EnvKeyEnforceMultiFactorAuthentication: false,
3738
constants.EnvKeyDisableMultiFactorAuthentication: false,
3839
constants.EnvKeyAppCookieSecure: true,

0 commit comments

Comments
 (0)