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

Function useSignInWithGoogle

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

Source from the content-addressed store, hash-verified

53};
54
55export const useSignInWithGoogle = (auth: Auth): SignInWithPopupHook => {
56 const createGoogleAuthProvider = useCallback(
57 (scopes?: string[], customOAuthParameters?: CustomParameters) => {
58 const provider = new GoogleAuthProvider();
59 if (scopes) {
60 scopes.forEach((scope) => provider.addScope(scope));
61 }
62 if (customOAuthParameters) {
63 provider.setCustomParameters(customOAuthParameters);
64 }
65 return provider;
66 },
67 []
68 );
69 return useSignInWithPopup(auth, createGoogleAuthProvider);
70};
71
72export const useSignInWithMicrosoft = (auth: Auth): SignInWithPopupHook => {
73 return useSignInWithOAuth(auth, 'microsoft.com');

Callers

nothing calls this directly

Calls 1

useSignInWithPopupFunction · 0.85

Tested by

no test coverage detected