mirror of
https://github.com/lbr77/SideImpactor.git
synced 2026-05-06 11:14:01 -04:00
fix: reauth error catch
This commit is contained in:
@@ -581,7 +581,17 @@ export async function loginAppleDeveloperAccount(request: AppleDeveloperLoginReq
|
|||||||
api = fresh.api;
|
api = fresh.api;
|
||||||
const { getAnisetteData } = await import('./anisette-service');
|
const { getAnisetteData } = await import('./anisette-service');
|
||||||
const freshAnisette = await getAnisetteData();
|
const freshAnisette = await getAnisetteData();
|
||||||
({ session } = await api.authenticate(appleId, password, freshAnisette, verificationCallback));
|
try {
|
||||||
|
({ session } = await api.authenticate(appleId, password, freshAnisette, verificationCallback));
|
||||||
|
} catch (reauth2) {
|
||||||
|
// If the fresh SRP exchange also hits the apptokens 2FA gate (rare),
|
||||||
|
// REAUTH_SENTINEL escapes here. Surface it as a human-readable error
|
||||||
|
// instead of exposing the internal sentinel string.
|
||||||
|
if (reauth2 instanceof Error && reauth2.message === REAUTH_SENTINEL) {
|
||||||
|
throw new Error('Authentication failed after two-factor verification. Please sign in again.');
|
||||||
|
}
|
||||||
|
throw reauth2;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
1177
sms-2fa.patch
Normal file
1177
sms-2fa.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user