Support for Custom URI Schemes in OAuth2 Redirect URIs (#37356)

Fix #34349

By the way, remove `(ctx *APIContext) HasAPIError() ` and `(ctx
*APIContext) GetErrMsg()` because they do nothing, the error handling
has been done in API's middeware

The existing OAuth2 tests were not quite right, refactored them together
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-04-22 21:33:27 +00:00
1 parent 8cfcef32c6
commit 83bdfc2a57
21 files changed
+340 -512

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ import (
func GetLabelEditForm(ctx *context.Context) *forms.CreateLabelForm {
form := web.GetForm(ctx).(*forms.CreateLabelForm)
if ctx.HasError() {
ctx.JSONError(ctx.Data["ErrorMsg"].(string))
ctx.JSONError(ctx.GetErrMsg())
return nil
}
var err error