Skip to content

Instantly share code, notes, and snippets.

@Mbbahar
Created January 8, 2021 15:18
Show Gist options
  • Save Mbbahar/8ec3a52d366611c836ca4fdd7682bce4 to your computer and use it in GitHub Desktop.
Save Mbbahar/8ec3a52d366611c836ca4fdd7682bce4 to your computer and use it in GitHub Desktop.
...
import auth from '@react-native-firebase/auth';
...
const __signIn = async () => {
try {
let response = await auth().signInWithEmailAndPassword(UserEmail, UserPassword)
if (response) {
console.log(response)
Alert.alert('Successful Login','Welcome the React Native')
}
} catch (e) {
console.error(e.message)
}
}
...
onPress={() => __signIn()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment