primer prueba de concepto para firebase

This commit is contained in:
2026-01-16 01:59:28 -03:00
parent 6d08a0985b
commit d89e2960d7
5 changed files with 235 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
<script>
import { getFirebaseAuth } from '$lib/stores/firebase.ts';
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
import Button from './ui/button/button.svelte';
const handleGoogleSignIn = async () => {
const auth = getFirebaseAuth();
const provider = new GoogleAuthProvider();
try {
await signInWithPopup(auth, provider);
} catch (error) {
console.error('Error signing in with Google:', error);
}
};
</script>
<Button onclick={handleGoogleSignIn}>Sign in with Google</Button>