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

Function signInWithAnonCredentials

firestore/scripts/PopulateFirestore.js:58–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 * Signs into an `Anonymous` user with which to post restaurants and comments.
57 */
58const signInWithAnonCredentials = async () => {
59 try {
60 await signInWithEmailAndPassword(
61 auth,
62 'Anonymous@Anonymous.com',
63 'AnonymousPassword'
64 );
65 } catch (userNotCreatedError) {
66 await createUserWithEmailAndPassword(
67 auth,
68 'Anonymous@Anonymous.com',
69 'AnonymousPassword'
70 );
71 }
72};
73
74/**
75 * Adds a single mock restaurant, and an associated rating, to the Firestore

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected