How can I send a confirmation email after creating a user using the firebase SDK? I am trying to combine createUser function and sendEmailVerification function can anyone provide a hint or answer? thanks
update:
user creation is performed by an administrator user who is already registered in the application, so the administrator user simply creates users in dashboad. This is completely different from registration methods.
update 2:
I tried to execute a bojeil answer , I still stick to the fact that the user is signing up with a user token. It conflicts with my current administrator session, admin users exit the game, and instead a new user logs in, and even when I log out a new user, the admin user still does not work and he needs to log in to return to the application.
here is my code inside the application after receiving a custom token:
$http.post('/.custom-token', {uid: $scope.data.data.uid}) .then(function (response) { console.log("custom token here:", response.data.token); firebase.auth().signInWithCustomToken(response.data.token) .then(function (firebaseUser) { firebaseUser.sendEmailVerification(); firebase.auth().signOut().then(function() {
So, I get a token, sign a new user, send a verification link by email, and then log out of the new user. But my administrator, who does all this, is also billing. What am I missing here?
angularjs firebase firebase-authentication firebase-admin
passion
source share