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

Function useSignInWithOAuth

auth/useSignInWithPopup.ts:97–115  ·  view source on GitHub ↗
(
  auth: Auth,
  providerId: string
)

Source from the content-addressed store, hash-verified

95};
96
97const useSignInWithOAuth = (
98 auth: Auth,
99 providerId: string
100): SignInWithPopupHook => {
101 const createOAuthProvider = useCallback(
102 (scopes?: string[], customOAuthParameters?: CustomParameters) => {
103 const provider = new OAuthProvider(providerId);
104 if (scopes) {
105 scopes.forEach((scope) => provider.addScope(scope));
106 }
107 if (customOAuthParameters) {
108 provider.setCustomParameters(customOAuthParameters);
109 }
110 return provider;
111 },
112 [providerId]
113 );
114 return useSignInWithPopup(auth, createOAuthProvider);
115};
116
117const useSignInWithPopup = (
118 auth: Auth,

Callers 3

useSignInWithAppleFunction · 0.85
useSignInWithMicrosoftFunction · 0.85
useSignInWithYahooFunction · 0.85

Calls 1

useSignInWithPopupFunction · 0.85

Tested by

no test coverage detected