()
| 18 | }; |
| 19 | |
| 20 | export const doSignInWithGoogle = async () => { |
| 21 | const provider = new GoogleAuthProvider(); |
| 22 | const result = await signInWithPopup(auth, provider); |
| 23 | const user = result.user; |
| 24 | |
| 25 | // Retrieve the user's ID token |
| 26 | const token = await user.getIdToken(); |
| 27 | |
| 28 | // Store the token in local storage (if needed) |
| 29 | localStorage.setItem("token", token); |
| 30 | |
| 31 | // Now token is stored and can be used for further requests |
| 32 | return { user, token }; |
| 33 | }; |
| 34 | |
| 35 | |
| 36 | export const doSignOut = () => { |
no outgoing calls
no test coverage detected