Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Jan 2, 2024
1 parent 326bee7 commit 83217c3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/services/firebase/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import { GrGoogle } from 'react-icons/gr';
import {
GoogleAuthProvider,
signInWithPopup,
signInWithRedirect,
getRedirectResult,
// signInWithRedirect,
// getRedirectResult,
signOut,
} from 'firebase/auth';

import { logIn } from './config';
import { API_URL } from '../../config';
// import { useUserRegister } from '../../hooks/querys';
import { useAuth } from '../../store/AuthContext';
// import { useAuth } from '../../store/AuthContext';

const provider = new GoogleAuthProvider();

Expand All @@ -32,16 +33,13 @@ function SignIn() {
// const result = await getRedirectResult(logIn);

// mutate(token);
const serverResponse = await fetch(
'http://localhost:9090/auth/register',
{
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'content-type': 'application/json',
},
const serverResponse = await fetch(`${API_URL}/auth/register`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'content-type': 'application/json',
},
);
});

if (serverResponse.ok) {
// El registro en el servidor fue exitoso, navegar a la página de perfil
Expand Down

1 comment on commit 83217c3

@vercel
Copy link

@vercel vercel bot commented on 83217c3 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

xbu – ./

xbu-franqsanz.vercel.app
xbu-git-main-franqsanz.vercel.app
xbu.vercel.app

Please sign in to comment.