MCPcopy Create free account
hub / github.com/firebase/codelab-friendlychat-web / checkSignedInWithMessage

Function checkSignedInWithMessage

appcheck/hosting/src/index.js:280–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278
279 // Returns true if user is signed-in. Otherwise false and displays a message.
280 function checkSignedInWithMessage() {
281 // Return true if the user is signed in Firebase
282 if (isUserSignedIn()) {
283 return true;
284 }
285
286 // Display a message to the user using a Toast.
287 var data = {
288 message: 'You must sign-in first',
289 timeout: 2000
290 };
291 signInSnackbarElement.MaterialSnackbar.showSnackbar(data);
292 return false;
293 }
294
295 // Resets the given MaterialTextField.
296 function resetMaterialTextfield(element) {

Callers 2

onMediaFileSelectedFunction · 0.70
onMessageFormSubmitFunction · 0.70

Calls 1

isUserSignedInFunction · 0.70

Tested by

no test coverage detected