[#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
+6
View File
@@ -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
- Fixed JS error on `file` settings `maxSelect` change ([#7731](https://github.com/pocketbase/pocketbase/issues/7731)).
-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},
},