feat: add aliyun captcha (#833)

* feat: add aliyun captcha provider

* Rename App key

* fix typo

* Rename HMACSHA1 & Reused clientId2 and clientSecret2

* Update ProviderEditPage.js

* Delete unused import

Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
This commit is contained in:
Resulte Lee
2022-06-29 11:31:32 +08:00
committed by GitHub
parent 8a66448365
commit a0e11cc8a0
9 changed files with 272 additions and 34 deletions

View File

@ -118,6 +118,10 @@ export const OtherProviderInfo = {
"hCaptcha": {
logo: `${StaticBaseUrl}/img/social_hcaptcha.png`,
url: "https://www.hcaptcha.com",
},
"Aliyun Captcha": {
logo: `${StaticBaseUrl}/img/social_aliyun.png`,
url: "https://help.aliyun.com/product/28308.html",
}
}
};
@ -614,6 +618,7 @@ export function getProviderTypeOptions(category) {
{id: 'Default', name: 'Default'},
{id: 'reCAPTCHA', name: 'reCAPTCHA'},
{id: 'hCaptcha', name: 'hCaptcha'},
{id: 'Aliyun Captcha', name: 'Aliyun Captcha'},
]);
} else {
return [];
@ -628,6 +633,11 @@ export function getProviderSubTypeOptions(type) {
{id: 'Third-party', name: 'Third-party'},
]
);
} else if (type === "Aliyun Captcha") {
return [
{id: 'nc', name: 'Sliding Validation'},
{id: 'ic', name: 'Intelligent Validation'},
];
} else {
return [];
}