GeezerVison is showing github.com — CurrentUser does not match the current Logon payload 'requriesTwoFactorAuth' · Issue #1 · vrchatapi/vrchatapi-java
CurrentUser does not match the current Logon payload 'requriesTwoFactorAuth' #1
Description
Version 1.15.0
java.lang.IllegalArgumentException: The field requiresTwoFactorAuth in the JSON string is not defined in the CurrentUser properties. JSON: {"requiresTwoFactorAuth":["emailOtp"]}
at io.github.vrchatapi.model.CurrentUser.validateJsonObject(CurrentUser.java:1810) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.model.CurrentUser$CustomTypeAdapterFactory$1.read(CurrentUser.java:1970) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.model.CurrentUser$CustomTypeAdapterFactory$1.read(CurrentUser.java:1960) ~[vrchatapi-java-1.15.0.jar:na]
at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:204) ~[gson-2.10.1.jar:na]
at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar:na]
at com.google.gson.Gson.fromJson(Gson.java:1137) ~[gson-2.10.1.jar:na]
at com.google.gson.Gson.fromJson(Gson.java:1047) ~[gson-2.10.1.jar:na]
at com.google.gson.Gson.fromJson(Gson.java:1014) ~[gson-2.10.1.jar:na]
at io.github.vrchatapi.JSON.deserialize(JSON.java:244) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.ApiClient.deserialize(ApiClient.java:851) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.ApiClient.handleResponse(ApiClient.java:1061) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.ApiClient.execute(ApiClient.java:985) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.api.AuthenticationApi.getCurrentUserWithHttpInfo(AuthenticationApi.java:453) ~[vrchatapi-java-1.15.0.jar:na]
at io.github.vrchatapi.api.AuthenticationApi.getCurrentUser(AuthenticationApi.java:434) ~[vrchatapi-java-1.15.0.jar:na]
at org.tfs.vrchat.api.client.VRChatAPIClient.login(VRChatAPIClient.java:56) ~[classes/:na]
Suspect that it needs a secondary call too for final Token Generation.
Activity
ariesclark commented on Nov 5, 2023
We're aware of this issue, but it's difficult to solve since many of our generators don't support the pattern that VRChat returns for this, needing to use oneOf in JSON Schema. You'll need to catch the error and handle it manually.
denis-hik commented on Jan 21, 2025
use
User.openapiFields.add("requiresTwoFactorAuthв ")
Other fields
error java.lang.IllegalArgumentException: The field <key> in the JSON string is not defined in the <T> properties. JSON =>
<T>.openapiFields.add(<key>)
Metadata
Metadata
Development
No branches or pull requestsIssue actions