I am trying to develop app with react-native and firebase.
In my app there is two way to loged in (as an user or as an admin)
Here is my question: How can I create a type for admin user?
const handlesignup = () => {
auth
.createUserwithEmailAndPassword(email, password)
.then((userCredentials) => {
const user = userCredentials.user;
console.log("Registered in with: ", user.email);
})
.catch((err) => alert(err.message));
};
const handelogin = () => {
auth
.signInwithEmailAndPassword(email, password)
.then((userCredentials) => {
const user = userCredentials.user;
console.log("Logged in with: ", user.email);
})
.catch((err) => alert(err.message));
};