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

Function toggleSignIn

auth/apple-redirect.ts:37–47  ·  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 OAuthProvider('apple.com');
40 provider.addScope('email');
41 provider.addScope('name');
42 signInWithRedirect(auth, provider);
43 } else {
44 signOut(auth);
45 }
46 signInButton.disabled = true;
47}
48
49// Result from Redirect auth flow.
50getRedirectResult(auth)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected