[#7734] removed RedirectURL required validator

This commit is contained in:
Gani Georgiev
2026-06-13 14:55:07 +03:00
parent 2e9cc27fc8
commit 2818208909
3 changed files with 12 additions and 5 deletions
-1
View File
@@ -203,7 +203,6 @@ func (form *recordOAuth2LoginForm) validate() error {
return validation.ValidateStruct(form,
validation.Field(&form.Provider, validation.Required, validation.Length(0, 100), validation.By(form.checkProviderName)),
validation.Field(&form.Code, validation.Required),
validation.Field(&form.RedirectURL, validation.Required),
)
}
+6 -4
View File
@@ -90,10 +90,11 @@ func TestRecordAuthWithOAuth2(t *testing.T) {
`"data":{`,
`"provider":`,
`"code":`,
`"redirectURL":`,
},
NotExpectedContent: []string{
`"codeVerifier":`, // should be optional
// should be optional
`"codeVerifier":`,
`"redirectURL":`,
},
ExpectedEvents: map[string]int{"*": 0},
},
@@ -109,10 +110,11 @@ func TestRecordAuthWithOAuth2(t *testing.T) {
`"data":{`,
`"provider":`,
`"code":`,
`"redirectURL":`,
},
NotExpectedContent: []string{
`"codeVerifier":`, // should be optional
// should be optional
`"codeVerifier":`,
`"redirectURL":`,
},
ExpectedEvents: map[string]int{"*": 0},
},