Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
checkFirebaseAuth(accessTokenData).then((user) => {
if (user){
Actions.home({type: ActionConst.RESET})
}else{ // user needs to login to get a Facebook auth token
Actions.login({type: ActionConst.RESET})
}
})
})
{ text: "退出", onPress: () => { axios.get(LOUGOUT_URL).then(() => Actions.login()); } },
{ text: "取消", onPress: () => console.log("Cancel Pressed"), style: "cancel" },
return (dispatch, state) => {
if (WebIM.conn.isOpened()) {
WebIM.conn.close('logout')
}
NavigationActions.login();
}
},
loginScreen = () => {
Actions.login();
}
signUpScreen = () => {
<button title="Go to Login"> Actions.login({ data: 'Custom data', title: 'Custom title' })} />
</button><button title="Go to Register page"></button>
onPress={()=>Actions.login()}
buttonText='Login'
.catch(() => Actions.login());
};
? () => Actions.login()
: provider == 'google'
.then(() => setTimeout(() => { Actions.pop(); Actions.login(); }, 1000))
.catch(() => {});
processAuth(props) {
if(props.auth.user != null) {
if(props.auth.user.uid) {
Actions.main({ type: 'reset' });
}else{
Actions.login({ type: 'reset' });
}
}
}