Base functionality with SDK44.
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
validatePasswordResetSuccess,
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
import { signInWithEmailAndPassword, signOut } from "firebase/auth";
|
||||
|
||||
export function* onEmailSignInStart() {
|
||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||
@@ -29,7 +30,7 @@ export function* onEmailSignInStart() {
|
||||
export function* signInWithEmail({ payload: { email, password } }) {
|
||||
try {
|
||||
logImEXEvent("imexmobile_sign_in_attempt", { user: email });
|
||||
const { user } = yield auth.signInWithEmailAndPassword(email, password);
|
||||
const { user } = yield signInWithEmailAndPassword(auth, email, password);
|
||||
yield put(
|
||||
signInSuccess({
|
||||
uid: user.uid,
|
||||
@@ -78,7 +79,7 @@ export function* signOutStart() {
|
||||
try {
|
||||
logImEXEvent("imexmobile_sign_out");
|
||||
|
||||
yield auth.signOut();
|
||||
yield signOut(auth);
|
||||
yield put(signOutSuccess());
|
||||
} catch (error) {
|
||||
yield put(signOutFailure(error.message));
|
||||
|
||||
Reference in New Issue
Block a user