feat: support all captcha for login (#1619)

* refactor: captcha modal

* feat: support all captcha when login

* chore: improve i18 in loginPage.js
This commit is contained in:
Yaodong Yu
2023-03-05 20:31:46 +08:00
committed by GitHub
parent f8bc87eb4e
commit e8a7b7ee9c
19 changed files with 160 additions and 247 deletions

View File

@ -86,8 +86,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
}
type captchaResponse struct {
Code int `json:"Code"`
Msg string `json:"Msg"`
Code string `json:"Code"`
Message string `json:"Message"`
}
captchaResp := &captchaResponse{}
@ -96,8 +96,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
return false, err
}
if captchaResp.Code != 100 {
return false, errors.New(captchaResp.Msg)
if captchaResp.Code != "100" {
return false, errors.New(captchaResp.Message)
}
return true, nil