MCPcopy Create free account
hub / github.com/firebase/quickstart-js / onAuthStateChangedHandler

Function onAuthStateChangedHandler

functions/public/scripts/main.ts:140–148  ·  view source on GitHub ↗
(user: User | null)

Source from the content-addressed store, hash-verified

138
139// This is called when the Firebase auth state has changed. i.e. the User has signed-in or signed-out.
140const onAuthStateChangedHandler = function(user: User | null) {
141 if (user) {
142 // When a user signs-in we remove the sign-in splash page.
143 splashPage.style.display = 'none';
144 } else {
145 // Display the splash page where you can sign-in.
146 splashPage.style.display = '';
147 }
148};
149
150// This is called when a new Message has been added to the realtime Database.
151const onNewMessage = function(snap: DataSnapshot) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected