forJ
forJ

Reputation: 4627

AWS Amplify throwing SerializationException when trying to login

I have a react native project which is connected to AWS mobilehub with AWS amplify. I have done all the configuration with mobilehub configure and pulled all the settings from aws using mobilehub pull

Register works perfectly fine. I am able to register user and get confirmation using

let resp = await Auth.signUp({
    username,
    password
});

However for some bizarre reason, when I use signIn function with exactly the same parameters, I get SerializationException

let resp = await Auth.signIn({
    username,
    password
});

The error I get is as below

7:34:24 PM: Object {
7:34:24 PM:   "code": "SerializationException",
7:34:24 PM:   "message": "Start of structure or map found where not expected.",
7:34:24 PM:   "name": "SerializationException",
7:34:24 PM: }

How do I resolve this? There is no documentation anywhere on what this error is saying.

Upvotes: 1

Views: 2339

Answers (1)

Leo Langinger
Leo Langinger

Reputation: 125

Just ran into this myself - you want to pass in username and password as separate arguments to Auth.signIn, not as values in an object.

Auth.signIn(username, password)

Hope that helps!

Upvotes: 4

Related Questions