@@ -55,7 +55,7 @@ export interface VRChatOptions extends Omit<NonNullable<Parameters<typeof create
5555 credentials ?: Lazy < LoginCredentials > ;
5656 /**
5757 * If set to `true`, the client will attempt to authenticate immediately after being created.
58- * If set to `false` or not provided , the client will only re-authenticate on request failure (e.g. 401 Unauthorized).
58+ * If set to `false`, the client will only re-authenticate on request failure (e.g. 401 Unauthorized).
5959 * @default true
6060 */
6161 optimistic ?: boolean ;
@@ -79,7 +79,9 @@ export interface LoginCredentials {
7979 */
8080 password : string ;
8181 /**
82- * The secret key for two-factor authentication.
82+ * The secret key for two-factor authentication, useful for service accounts & automated workflows.
83+ * If this is a user-initiated login, don't use this.
84+ *
8385 * Equivalent to ``twoFactorCode: TOTP.generate(totpSecret).otp``.
8486 */
8587 totpSecret ?: string ;
@@ -370,8 +372,8 @@ export class VRChat extends VRChatInternal {
370372
371373 const factors = await Promise . all ( [
372374 twoFactorMethods . includes ( "totp" ) ? this . verify2Fa . bind ( this ) : undefined ,
373- // this.verify2FaEmailCode.bind(this),
374- // this.verifyRecoveryCode.bind(this)
375+ twoFactorMethods . includes ( "otp" ) ? this . verify2FaEmailCode . bind ( this ) : undefined ,
376+ twoFactorMethods . includes ( "otp" ) ? this . verifyRecoveryCode . bind ( this ) : undefined
375377 ] . filter ( Boolean ) . map ( ( function_ ) => function_ ?.( {
376378 ...options ,
377379 throwOnError : false ,
0 commit comments