Revisamos cada una de las reseñas de nuestro sitio web con la meta de mostrarte en todo momento la información certera y actualizada.
Ejemplo 1: Firebase auth obtiene el usuario actual
var user = firebase.auth().currentUser;var name, email, photoUrl, uid, emailVerified;if (user != null) name = user.displayName; email = user.email; photoUrl = user.photoURL; emailVerified = user.emailVerified; uid = user.uid; // The user's ID, unique to the Firebase project. Do NOT use // this value to authenticate with your backend server, if // you have one. Use User.getToken() instead.
Ejemplo 2: firebase obtiene todos los usuarios
If you need to lookup users by uid, email or phoneNumber, you can use the Admin SDK to do so:
https://firebase.google.com/docs/auth/admin/manage-users
You also even have the ability to download all your users: https://firebase.google.com/docs/auth/admin/manage-users#list_all_users
You would need to do that from a Node.js backend server or via HTTP endpoints with Firebase Functions.
In addition the Admin SDK allows you to set custom user attributes which could be helpful if you want to create different user groups:
https://firebase.google.com/docs/auth/admin/custom-claims
admin.auth().setCustomUserClaims(uid, groupId: '1234')
Nos puedes amparar nuestro trabajo poniendo un comentario o puntuándolo te lo agradecemos.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)