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

Function toggleSignIn

auth/twitter-redirect.ts:40–48  ·  view source on GitHub ↗

* Function called when clicking the Login/Logout button.

()

Source from the content-addressed store, hash-verified

38 * Function called when clicking the Login/Logout button.
39 */
40function toggleSignIn() {
41 if (!auth.currentUser) {
42 const provider = new TwitterAuthProvider();
43 signInWithRedirect(auth, provider);
44 } else {
45 signOut(auth);
46 }
47 signInButton.disabled = true;
48}
49
50// Result from Redirect auth flow.
51getRedirectResult(auth)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected