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

Function toggleSignIn

auth/github-redirect.ts:37–46  ·  view source on GitHub ↗

* Function called when clicking the Login/Logout button.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected