Skip to content

AuthenticationApi.verify2FA not working due to incorrect data format #8

@theautonomousdev

Description

@theautonomousdev

AuthenticationApi.verify2FA fails returning a HTTP status code 400 due to incorrect data format in the request, in the code the format is the following:

vrchat/dist/api.js - line 627
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(twoFactorAuthCode, localVarRequestOptions, configuration);

api.ts - line 7116
localVarRequestOptions.data = serializeDataIfNeeded(twoFactorAuthCode, localVarRequestOptions, configuration)

According to the VRChat API Docs (https://vrchatapi.github.io/docs/api/#post-/auth/twofactorauth/totp/verify) the code should be nested:

vrchat/dist/api.js - line 627

localVarRequestOptions.data = {
  code: (0, common_1.serializeDataIfNeeded)(twoFactorAuthCode, localVarRequestOptions, configuration)
}

api.ts - line 7116

localVarRequestOptions.data = {
  code: serializeDataIfNeeded(twoFactorAuthCode, localVarRequestOptions, configuration)
};

Making the above change fixes the issue, it looks like the same issue may effect verify2FAEmailCode and verifyRecoveryCode looking at the code but I haven't tested and confirmed this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions