mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: support configurable captcha(reCaptcha & hCaptcha) (#765)
* feat: support configurable captcha(layered architecture) * refactor & add captcha logo * rename captcha * Update authz.go * Update hcaptcha.go * Update default.go * Update recaptcha.go Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
This commit is contained in:
@ -106,6 +106,20 @@ export const OtherProviderInfo = {
|
||||
url: "https://gc.org"
|
||||
},
|
||||
},
|
||||
Captcha: {
|
||||
"Default": {
|
||||
logo: `${StaticBaseUrl}/img/social_default.png`,
|
||||
url: "https://pkg.go.dev/github.com/dchest/captcha",
|
||||
},
|
||||
"reCAPTCHA": {
|
||||
logo: `${StaticBaseUrl}/img/social_recaptcha.png`,
|
||||
url: "https://www.google.com/recaptcha",
|
||||
},
|
||||
"hCaptcha": {
|
||||
logo: `${StaticBaseUrl}/img/social_hcaptcha.png`,
|
||||
url: "https://www.hcaptcha.com",
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function getCountryRegionData() {
|
||||
@ -595,6 +609,12 @@ export function getProviderTypeOptions(category) {
|
||||
{id: 'PayPal', name: 'PayPal'},
|
||||
{id: 'GC', name: 'GC'},
|
||||
]);
|
||||
} else if (category === "Captcha") {
|
||||
return ([
|
||||
{id: 'Default', name: 'Default'},
|
||||
{id: 'reCAPTCHA', name: 'reCAPTCHA'},
|
||||
{id: 'hCaptcha', name: 'hCaptcha'},
|
||||
]);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
Reference in New Issue
Block a user