Include sentry username
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
|||||||
validatePasswordResetSuccess,
|
validatePasswordResetSuccess,
|
||||||
} from "./user.actions";
|
} from "./user.actions";
|
||||||
import UserActionTypes from "./user.types";
|
import UserActionTypes from "./user.types";
|
||||||
|
import * as Sentry from "@sentry/browser";
|
||||||
|
|
||||||
export function* onEmailSignInStart() {
|
export function* onEmailSignInStart() {
|
||||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||||
@@ -178,6 +179,11 @@ export function* signInSuccessSaga({ payload }) {
|
|||||||
]);
|
]);
|
||||||
console.log("Setting $crisp segments", ["user"]);
|
console.log("Setting $crisp segments", ["user"]);
|
||||||
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
||||||
|
|
||||||
|
Sentry.setUser({
|
||||||
|
email: payload.email,
|
||||||
|
username: payload.displayName || payload.email,
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error updating Crisp settings.", error);
|
console.log("Error updating Crisp settings.", error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user