feat: 添加手机号认证失败处理逻辑,确保在遇到手机号页面时自动停止授权流程
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
getLoginAuthStateLabel,
|
||||
getOAuthFlowStepTimeoutMs,
|
||||
getState,
|
||||
isAddPhoneAuthFailure = (error) => {
|
||||
const message = String(typeof error === 'string' ? error : error?.message || '');
|
||||
return /https:\/\/auth\.openai\.com\/add-phone(?:[/?#]|$)|\badd-phone\b|添加手机号|手机号码|手机号页|手机号页面|手机号|phone\s+number|telephone/i.test(message);
|
||||
},
|
||||
isStep6RecoverableResult,
|
||||
isStep6SuccessResult,
|
||||
refreshOAuthUrlBeforeStep6,
|
||||
@@ -19,11 +23,6 @@
|
||||
throwIfStopped,
|
||||
} = deps;
|
||||
|
||||
function isAddPhoneAuthFailure(error) {
|
||||
const message = String(typeof error === 'string' ? error : error?.message || '');
|
||||
return /https:\/\/auth\.openai\.com\/add-phone(?:[/?#]|$)|add-phone|手机号页面|手机号码|手机号|phone\s+number|telephone/i.test(message);
|
||||
}
|
||||
|
||||
async function executeStep7(state) {
|
||||
if (!state.email) {
|
||||
throw new Error('缺少邮箱地址,请先完成步骤 3。');
|
||||
|
||||
Reference in New Issue
Block a user