Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
How to use firebase authentication?

I want to use firebase Realtime database to authenticate my users and store their data. I just started firebase and it seems like they have updated the script tags, no video is there using that . Can someone plz tell me complete work flow

What I want ? User signs in then when the click save ,their data is saved and when the click a load button there data must be retrieved from it.

My problems

  1. If I use below given code then I have to write whole javascript in html file only as I can't access initializeApp() in my .js file
console.log(initializeApp)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Auth</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="auth">
        <div class="login">Login</div>
        <div class="logout">Logout</div>
    </div>



    <script type="module">
      // Import the functions you need from the SDKs you need
      import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.5/firebase-app.js";
    
      // Your web app's Firebase configuration
      const firebaseConfig = {
        apiKey: "AIzaSyBp8Z9sTTI6XvrFIWZ71nbx-0NbsvXED_c",
        authDomain: "todo-firebase-a8101.firebaseapp.com",
        projectId: "todo-firebase-a8101",
        storageBucket: "todo-firebase-a8101.appspot.com",
        messagingSenderId: "309943992224",
        appId: "1:309943992224:web:19d0b8a537528400a2aec5"
      };
    
      // Initialize Firebase
      const app = initializeApp(firebaseConfig);
      </script>

    <!-- <script type="module" src="https://www.gstatic.com/firebasejs/9.6.5/firebase-app.js"></script> -->
    <script src="index.js"></script>
</body>
</html>
  1. Also the commented script tag throws the same error, How to solve this?
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda