使用redux thunk与firebase注册身份验证

使用redux thunk与firebase注册身份验证,firebase,react-native,firebase-authentication,redux-thunk,Firebase,React Native,Firebase Authentication,Redux Thunk,我正在尝试使用redux thunk在firebase中注册/添加用户。我正在尝试添加用户的电子邮件id和密码。提交时,我触发我的submithandler,我在其中发送操作“auth”,我的操作代码为:- `export const SIGNUP ='SIGNUP'; export const signup = (email, password ) =>{ return async dispatch =>{ let response; try{ re

我正在尝试使用redux thunk在firebase中注册/添加用户。我正在尝试添加用户的电子邮件id和密码。提交时,我触发我的submithandler,我在其中发送操作“auth”,我的操作代码为:-

`export const SIGNUP ='SIGNUP';

  export const signup = (email, password ) =>{
   return async dispatch =>{
   let response;
   try{
    response = await fetch('https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=[My-API- 
    Key]',
        {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({
            email: email,
            password: password,
            returnSecureToken: true
          })
        });
      console.log(response)
      } catch(e){
       console.log(e);
     }
    // if(!response.ok){
    //     throw new Error('Something went wrong!');
    // }
      const resData = await response.json();
       console.log(resData);
       dispatch({type: SIGNUP});
  
      }
    };`
在安慰错误的时候
Object{“error”:Object{“code”:400,“errors”:数组[Object{“domain”:“global”,“message”:“INVALID_-EMAIL”,“reason”:“INVALID”,},,,“message”:“INVALID_-EMAIL”,},}


提前谢谢

它说问题是一封无效的电子邮件。你确定你尝试使用的电子邮件地址格式正确吗?是的,我尝试了我的原始电子邮件id,但没有解决同一问题。