Update ChallengeType
This commit is contained in:
parent
9f40562b19
commit
231bf91a22
2 changed files with 11 additions and 4 deletions
|
@ -46,7 +46,7 @@ type Handler = Readonly<{
|
|||
}>;
|
||||
|
||||
export type ChallengeData = Readonly<{
|
||||
type: 'recaptcha';
|
||||
type: 'captcha';
|
||||
token: string;
|
||||
captcha: string;
|
||||
}>;
|
||||
|
@ -259,7 +259,14 @@ export class ChallengeHandler {
|
|||
log.info(`${logId}: tracking ${conversationId} with no waitTime`);
|
||||
}
|
||||
|
||||
if (data && !data.options?.includes('recaptcha')) {
|
||||
if (
|
||||
data &&
|
||||
!(
|
||||
data.options?.includes('captcha') ||
|
||||
// 'recaptcha' is deprecated for removal in 90 days
|
||||
data.options?.includes('recaptcha')
|
||||
)
|
||||
) {
|
||||
log.error(`${logId}: unexpected options ${JSON.stringify(data.options)}`);
|
||||
}
|
||||
|
||||
|
@ -384,7 +391,7 @@ export class ChallengeHandler {
|
|||
|
||||
try {
|
||||
await this.sendChallengeResponse({
|
||||
type: 'recaptcha',
|
||||
type: 'captcha',
|
||||
token: lastToken,
|
||||
captcha,
|
||||
});
|
||||
|
|
|
@ -1211,7 +1211,7 @@ export type ServerKeysType = {
|
|||
};
|
||||
|
||||
export type ChallengeType = {
|
||||
readonly type: 'recaptcha';
|
||||
readonly type: 'captcha';
|
||||
readonly token: string;
|
||||
readonly captcha: string;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue