fix: 阿里云未提交认证保持等待状态
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,13 @@ final class AliyunProvider implements ProviderInterface {
|
|||||||
return ProviderResult::pending(['result_code' => $response->get_error_code(), 'message' => __('认证结果暂未取回,请稍后重试', 'aksrt')]);
|
return ProviderResult::pending(['result_code' => $response->get_error_code(), 'message' => __('认证结果暂未取回,请稍后重试', 'aksrt')]);
|
||||||
}
|
}
|
||||||
$code = sanitize_text_field((string) ($response['Code'] ?? ''));
|
$code = sanitize_text_field((string) ($response['Code'] ?? ''));
|
||||||
|
if ($code === '424') {
|
||||||
|
return ProviderResult::pending([
|
||||||
|
'request_id' => sanitize_text_field((string) ($response['RequestId'] ?? '')),
|
||||||
|
'result_code' => $code,
|
||||||
|
'message' => __('用户尚未在阿里云核身页面提交认证,请完成后再刷新结果', 'aksrt'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
if ($code !== '' && $code !== '200') {
|
if ($code !== '' && $code !== '200') {
|
||||||
return ProviderResult::failed($code, sanitize_text_field((string) ($response['Message'] ?? '')));
|
return ProviderResult::failed($code, sanitize_text_field((string) ($response['Message'] ?? '')));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user