Skip to content

Commit 31e39da

Browse files
committed
fix: try sign in with redirect
while not optimal we are getting redirect loops
1 parent 77581aa commit 31e39da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/formElements/Buttons.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { ExclamationCircleIcon } from '@heroicons/react/20/solid';
22
import { useFirebaseAuth } from '@ugrc/utah-design-system';
33
import { clsx } from 'clsx';
4+
import { signInWithRedirect } from 'firebase/auth';
45
import PropTypes from 'prop-types';
56

67
export const LogInButton = () => {
7-
const { login } = useFirebaseAuth();
8+
const { auth, provider } = useFirebaseAuth();
89

910
const handleClick = () => {
10-
login();
11+
signInWithRedirect(auth, provider);
1112
};
1213

1314
return (

0 commit comments

Comments
 (0)