We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the following error when trying to login using a custom token containing an array:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.lang.String out of START_ARRAY token at [Source: (okio.RealBufferedSource$1); line: 1, column: 212] (through reference chain: com.mongodb.stitch.core.auth.internal.models.ApiCoreUserProfile["data"]->java.util.LinkedHashMap["accountIds"])
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of
out of START_ARRAY token at [Source: (okio.RealBufferedSource$1); line: 1, column: 212] (through reference chain: com.mongodb.stitch.core.auth.internal.models.ApiCoreUserProfile["data"]->java.util.LinkedHashMap["accountIds"])
I get a similar Jackson error if I use a nested object within the user_data property. If I revert these to simple strings etc then it succeeds.
Version: 4.5.0
JWT payload:
{ "aud": "<app_id>", "sub": "<user_id>", "iat": 1570452225, "exp": 1570458825, "user_data": { "accountIds": [ "<id_1>", "<id_2>" ] } }
Code to reproduce is based on the Sample Todo List repo with the following addition in LogonActivity.java:
private void enableCustomAuth() { String token = "<jwt_token>"; findViewById(R.id.custom_login_button).setOnClickListener(ignored -> TodoListActivity.client.getAuth().loginWithCredential(new CustomCredential(token)) .addOnSuccessListener(user -> { Toast.makeText(LogonActivity.this, "Logged in Custom. ID: " + user.getId(), Toast.LENGTH_LONG).show(); setResult(Activity.RESULT_OK); finish(); }) .addOnFailureListener(e -> { Log.d("Stitch Auth", "error logging in", e); Toast.makeText(LogonActivity.this, "Failed to log in Anonymously. " + "Did you enable Anonymous Auth in your Stitch backend and copy " + "your Stitch App ID to strings.xml?", Toast.LENGTH_LONG).show(); })); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I get the following error when trying to login using a custom token containing an array:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of
java.lang.Stringout of START_ARRAY token at [Source: (okio.RealBufferedSource$1); line: 1, column: 212] (through reference chain: com.mongodb.stitch.core.auth.internal.models.ApiCoreUserProfile["data"]->java.util.LinkedHashMap["accountIds"])
I get a similar Jackson error if I use a nested object within the user_data property. If I revert these to simple strings etc then it succeeds.
Version: 4.5.0
JWT payload:
{ "aud": "<app_id>", "sub": "<user_id>", "iat": 1570452225, "exp": 1570458825, "user_data": { "accountIds": [ "<id_1>", "<id_2>" ] } }
Code to reproduce is based on the Sample Todo List repo with the following addition in LogonActivity.java:
The text was updated successfully, but these errors were encountered: