Skip to content

Commit

Permalink
Update Sign In Method from Redirect to Popup
Browse files Browse the repository at this point in the history
  • Loading branch information
luisaugusto committed Feb 5, 2024
1 parent 601142c commit 920970f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/useAuth.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { auth } from './config.js';
import { GoogleAuthProvider, signInWithRedirect } from 'firebase/auth';
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
import { addUserToDatabase } from './firebase.js';

/**
Expand All @@ -11,7 +11,7 @@ import { addUserToDatabase } from './firebase.js';
export const SignInButton = () => (
<button
type="button"
onClick={() => signInWithRedirect(auth, new GoogleAuthProvider())}
onClick={() => signInWithPopup(auth, new GoogleAuthProvider())}
>
Sign In
</button>
Expand Down

0 comments on commit 920970f

Please sign in to comment.