Skip to content

Instantly share code, notes, and snippets.

@cmilfont
Last active April 30, 2017 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmilfont/22d0520e4fc5bf8a7f733fe5d77de141 to your computer and use it in GitHub Desktop.
Save cmilfont/22d0520e4fc5bf8a7f733fe5d77de141 to your computer and use it in GitHub Desktop.
LogRocket identify
onAuthStateChanged = (user) => {
if (user) {
const { uid, name, email } = user;
window.LogRocket.identify(uid, { name, email });
this.store.dispatch({
type: actions.loginSuccess,
payload: {
user,
},
});
} else {
window.Raven.captureMessage('User not logged in', {
level: 'info'
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment