[#7734] removed RedirectURL required validator
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## v0.39.4
|
||||||
|
|
||||||
|
- Removed `redirectURL` required validator from the code->token exchange endpoint (aka. `authWithOAuth2Code()`) ([#7734](https://github.com/pocketbase/pocketbase/issues/7734)).
|
||||||
|
_Note that the OAuth2 provider has their own validations and whether it is allowed to be empty or not could depend on the configured OAuth2 app (in most cases it is required and the redirect address must match with the initial value submitted with the authorization request)._
|
||||||
|
|
||||||
|
|
||||||
## v0.39.3
|
## v0.39.3
|
||||||
|
|
||||||
- Fixed JS error on `file` settings `maxSelect` change ([#7731](https://github.com/pocketbase/pocketbase/issues/7731)).
|
- Fixed JS error on `file` settings `maxSelect` change ([#7731](https://github.com/pocketbase/pocketbase/issues/7731)).
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ func (form *recordOAuth2LoginForm) validate() error {
|
|||||||
return validation.ValidateStruct(form,
|
return validation.ValidateStruct(form,
|
||||||
validation.Field(&form.Provider, validation.Required, validation.Length(0, 100), validation.By(form.checkProviderName)),
|
validation.Field(&form.Provider, validation.Required, validation.Length(0, 100), validation.By(form.checkProviderName)),
|
||||||
validation.Field(&form.Code, validation.Required),
|
validation.Field(&form.Code, validation.Required),
|
||||||
validation.Field(&form.RedirectURL, validation.Required),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,11 @@ func TestRecordAuthWithOAuth2(t *testing.T) {
|
|||||||
`"data":{`,
|
`"data":{`,
|
||||||
`"provider":`,
|
`"provider":`,
|
||||||
`"code":`,
|
`"code":`,
|
||||||
`"redirectURL":`,
|
|
||||||
},
|
},
|
||||||
NotExpectedContent: []string{
|
NotExpectedContent: []string{
|
||||||
`"codeVerifier":`, // should be optional
|
// should be optional
|
||||||
|
`"codeVerifier":`,
|
||||||
|
`"redirectURL":`,
|
||||||
},
|
},
|
||||||
ExpectedEvents: map[string]int{"*": 0},
|
ExpectedEvents: map[string]int{"*": 0},
|
||||||
},
|
},
|
||||||
@@ -109,10 +110,11 @@ func TestRecordAuthWithOAuth2(t *testing.T) {
|
|||||||
`"data":{`,
|
`"data":{`,
|
||||||
`"provider":`,
|
`"provider":`,
|
||||||
`"code":`,
|
`"code":`,
|
||||||
`"redirectURL":`,
|
|
||||||
},
|
},
|
||||||
NotExpectedContent: []string{
|
NotExpectedContent: []string{
|
||||||
`"codeVerifier":`, // should be optional
|
// should be optional
|
||||||
|
`"codeVerifier":`,
|
||||||
|
`"redirectURL":`,
|
||||||
},
|
},
|
||||||
ExpectedEvents: map[string]int{"*": 0},
|
ExpectedEvents: map[string]int{"*": 0},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user