(auth: Auth)
| 74 | }; |
| 75 | |
| 76 | export const useSignInWithTwitter = (auth: Auth): SignInWithPopupHook => { |
| 77 | const createTwitterAuthProvider = useCallback( |
| 78 | (scopes?: string[], customOAuthParameters?: CustomParameters) => { |
| 79 | const provider = new TwitterAuthProvider(); |
| 80 | if (scopes) { |
| 81 | scopes.forEach((scope) => provider.addScope(scope)); |
| 82 | } |
| 83 | if (customOAuthParameters) { |
| 84 | provider.setCustomParameters(customOAuthParameters); |
| 85 | } |
| 86 | return provider; |
| 87 | }, |
| 88 | [] |
| 89 | ); |
| 90 | return useSignInWithPopup(auth, createTwitterAuthProvider); |
| 91 | }; |
| 92 | |
| 93 | export const useSignInWithYahoo = (auth: Auth): SignInWithPopupHook => { |
| 94 | return useSignInWithOAuth(auth, 'yahoo.com'); |
nothing calls this directly
no test coverage detected