(auth: Auth)
| 53 | }; |
| 54 | |
| 55 | export const useSignInWithGoogle = (auth: Auth): SignInWithPopupHook => { |
| 56 | const createGoogleAuthProvider = useCallback( |
| 57 | (scopes?: string[], customOAuthParameters?: CustomParameters) => { |
| 58 | const provider = new GoogleAuthProvider(); |
| 59 | if (scopes) { |
| 60 | scopes.forEach((scope) => provider.addScope(scope)); |
| 61 | } |
| 62 | if (customOAuthParameters) { |
| 63 | provider.setCustomParameters(customOAuthParameters); |
| 64 | } |
| 65 | return provider; |
| 66 | }, |
| 67 | [] |
| 68 | ); |
| 69 | return useSignInWithPopup(auth, createGoogleAuthProvider); |
| 70 | }; |
| 71 | |
| 72 | export const useSignInWithMicrosoft = (auth: Auth): SignInWithPopupHook => { |
| 73 | return useSignInWithOAuth(auth, 'microsoft.com'); |
nothing calls this directly
no test coverage detected