A
A
alex_kulkoff2018-09-17 12:27:09
firebase
alex_kulkoff, 2018-09-17 12:27:09

Creating Users in Firebase? How to disable onAuthStateChanged?

Hello. The question is the following. In the application, I create users myself. It turns out that after registering a user using

fb.auth().createUserWithEmailAndPassword(payload.email, payload.password)

After that, onAuthStateChanged is executed on the user that he created. Is it possible to turn it off somehow? Didn't find it in the description.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-09-24
@D0KT0P

If you mean disabling an event you have already connected, then this:

var unsubscribe = firebase.auth().onAuthStateChanged(function (user) {
 //....
});

unsubscribe();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question