title: Firebase authentication with redux and typescript
body: <p>I am trying to add authentication to a react website using firebase
  I currently have this createasyncthunk</p>
  <pre><code>    export const signin = createAsyncThunk&lt;
    // Return type of the payload creator
    User | void,
    // First argument to the payload creator
    userData,
    // Types for ThunkAPI
    {
      rejectValue: errorInterface;
    }
  &gt;('authentication/signin',  (user, thunkApi) =&gt; {
    const { email, password } = user;
    signInWithEmailAndPassword(auth, email, password)
      .then((userCredential) =&gt; {
        // Signed in
        const user = userCredential.user;
        return user;
      })
      .catch((error) =&gt; {
        console.log(error.message, error.code)
        const errorMessage: errorInterface = { message: error.code };
        return thunkApi.rejectWithValue(errorMessage);
      });
  });
  </code></pre>
  <p>the user type is imported from fire base
  the userData is the following interface to represent credentials used to log in</p>
  <pre><code>interface userData {
    email: string;
    password: string;
  }
  </code></pre>
  <p>the error interface is the following</p>
  <pre><code>interface errorInterface {
    message: string;
  }
  </code></pre>
  <p>the authentication slice is this</p>
  <pre><code>export const authSlice = createSlice({
    name: 'authentication',
    initialState,
    reducers: {},
    extraReducers: (builder) =&gt; {
      builder
        .addCase(signin.pending, (state) =&gt; {
          state.status = 'loading';
          state.isAuth = false;
        })
        .addCase(signin.fulfilled, (state, action) =&gt; {
          state.status = 'idle';
          state.isAuth = true;
          if (action.payload) {
            state.user = action.payload;
          }
        })
        .addCase(signin.rejected, (state, action) =&gt; {
          state.status = 'failed';
          state.isAuth = false;
          if (action.payload) {
            state.message = action.payload.message;
          }
        })
    },
  });
  </code></pre>
  <p>The problem is that signin.rejected is never trigered. Even when the catch block runs, rejectwithvalue is not updating the payload. I know the catch block is running because I can see the error in the console. Please help me out, thanks in advance</p>