Skip to content

[V3] ios login errors from loginWithEmailAndPassword coming back as undefined #288

@SamMatthewsIsACommonName

Description

Hi so I'm using the latest v3 branch like this:

export const loginWithEmail = ({ email, password }) =>
((dispatch: Dispatch) => {
  console.log(email, password);
  dispatch({ type: BEGIN_EMAIL_LOGIN });
  firestack.auth()
  .signInWithEmailAndPassword(email, password)
  .then((user) => {
    console.log('firebase sign in succesful: ', user)
    dispatch({
      type: FIREBASE_LOGIN_SUCCESFUL,
    });
  })
  .catch(err => console.log('error logging into firebase ', err));
});

which works if I provide the right email and password, but any error I get back is just coming back as an object with code of "" and message of undefined:

screen shot 2017-02-15 at 16 34 54

once I have some error messages to go off I'm finally going to get around to making that error code nromalising module Ive been promising forever, but I need an error code haha

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