Skip to content

Commit 26d636b

Browse files
committed
fix: email code uses emailOtp not otp.
1 parent f4a94d2 commit 26d636b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface VRChatOptions extends Omit<NonNullable<Parameters<typeof create
6666
keyv?: Keyv<unknown> | KeyvStoreAdapter | Map<unknown, unknown>;
6767
}
6868

69-
export const TwoFactorMethods = ["totp", "otp"] as const;
69+
export const TwoFactorMethods = ["totp", "otp", "emailOtp"] as const;
7070
export type TwoFactorMethods = (typeof TwoFactorMethods)[number];
7171

7272
export interface LoginCredentials {
@@ -372,7 +372,7 @@ export class VRChat extends VRChatInternal {
372372

373373
const factors = await Promise.all([
374374
twoFactorMethods.includes("totp") ? this.verify2Fa.bind(this) : undefined,
375-
twoFactorMethods.includes("otp") ? this.verify2FaEmailCode.bind(this) : undefined,
375+
twoFactorMethods.includes("emailOtp") ? this.verify2FaEmailCode.bind(this) : undefined,
376376
twoFactorMethods.includes("otp") ? this.verifyRecoveryCode.bind(this) : undefined
377377
].filter(Boolean).map((function_) => function_?.({
378378
...options,

0 commit comments

Comments
 (0)