async logout() { try { await firebase.auth().signOut(); this.props.navigator.push({ name: "Login" }) } catch (error) { console.log(error); } }
const Home = () => { return ( <> <h1>Home</h1> <button onClick={() => app.auth().signOut()}>Sign out</button> </> ); }
firebase.auth().signOut().then(() => { navigator.pop(); }, function (error) { // An error happened. });
logout(){ firebase.auth().signOut().then(() =>{ this.setState({ user:null }) this.props.history.push("/"); }).catch(function(error) { // An error happened. }); }
const logout = () => async dispatch => { try { const firebase = require('firebase'); // eslint-disable-line global-require await firebase.auth().signOut(); console.log('User Logged Out!'); dispatch({ type: LOGOUT_SUCCESS }); } catch (err) { console.log('err:', err); } }
const startLogout = () => { return () => { return firebase.auth().signOut(); }; }
const signOut = () => { return firebase.auth().signOut() .then(() => { setSession(); }) .catch((error) => { setSession(); }); }
handleLogOut() { firebase.auth().signOut() this.props.navigator.immediatelyResetRouteStack([{ name: 'LOGIN' }]) }
logOut() { this.afAuth.auth.signOut(); }
/** * @return {Promise} */ signout() { return firebase.auth().signOut(); }
const startLogout = () => { return () => { return firebase.auth().signOut(); } }
const startLogout = () => { return () => { return firebase.auth().signOut(); }; }
export async function signOut() { await firebase.auth().signOut(); }
handleLogOut() { firebase.auth().signOut() this.props.navigator.immediatelyResetRouteStack([{ name: 'LOGIN', direction: 'LEFT' }]) }
const logout = () => { return firebase.auth().signOut(); }