(auth: Auth)
| 36 | }; |
| 37 | |
| 38 | export const useSignInWithGithub = (auth: Auth): SignInWithPopupHook => { |
| 39 | const createGithubAuthProvider = useCallback( |
| 40 | (scopes?: string[], customOAuthParameters?: CustomParameters) => { |
| 41 | const provider = new GithubAuthProvider(); |
| 42 | if (scopes) { |
| 43 | scopes.forEach((scope) => provider.addScope(scope)); |
| 44 | } |
| 45 | if (customOAuthParameters) { |
| 46 | provider.setCustomParameters(customOAuthParameters); |
| 47 | } |
| 48 | return provider; |
| 49 | }, |
| 50 | [] |
| 51 | ); |
| 52 | return useSignInWithPopup(auth, createGithubAuthProvider); |
| 53 | }; |
| 54 | |
| 55 | export const useSignInWithGoogle = (auth: Auth): SignInWithPopupHook => { |
| 56 | const createGoogleAuthProvider = useCallback( |
nothing calls this directly
no test coverage detected