mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user