[#7734] removed RedirectURL required validator
This commit is contained in:
@@ -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),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user