MCPcopy Index your code
hub / github.com/CSFrequency/react-firebase-hooks / useSignInWithTwitter

Function useSignInWithTwitter

auth/useSignInWithPopup.ts:76–91  ·  view source on GitHub ↗
(auth: Auth)

Source from the content-addressed store, hash-verified

74};
75
76export 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
93export const useSignInWithYahoo = (auth: Auth): SignInWithPopupHook => {
94 return useSignInWithOAuth(auth, 'yahoo.com');

Callers

nothing calls this directly

Calls 1

useSignInWithPopupFunction · 0.85

Tested by

no test coverage detected