(auth: Auth)
| 19 | }; |
| 20 | |
| 21 | export const useSignInWithFacebook = (auth: Auth): SignInWithPopupHook => { |
| 22 | const createFacebookAuthProvider = useCallback( |
| 23 | (scopes?: string[], customOAuthParameters?: CustomParameters) => { |
| 24 | const provider = new FacebookAuthProvider(); |
| 25 | if (scopes) { |
| 26 | scopes.forEach((scope) => provider.addScope(scope)); |
| 27 | } |
| 28 | if (customOAuthParameters) { |
| 29 | provider.setCustomParameters(customOAuthParameters); |
| 30 | } |
| 31 | return provider; |
| 32 | }, |
| 33 | [] |
| 34 | ); |
| 35 | return useSignInWithPopup(auth, createFacebookAuthProvider); |
| 36 | }; |
| 37 | |
| 38 | export const useSignInWithGithub = (auth: Auth): SignInWithPopupHook => { |
| 39 | const createGithubAuthProvider = useCallback( |
nothing calls this directly
no test coverage detected