title: Using firebase to login with ejs partials
body: <p>Disclaimer: I am new with nodejs learned it just recently, so it's possible that what I am trying to do isn't optimal and it's better to do it in another way.</p>
  
  <p>I am trying to login with the firebase API key:<a href="https://firebase.google.com/docs/web/setup" rel="nofollow noreferrer">https://firebase.google.com/docs/web/setup</a>
  in an ejs file and I don't know how to do it.
  I have the key to put at the bottom of the page but I don't manage to get the script from the URL.</p>
  
  <p>If it matters
  I am running express server on nodejs:</p>
  
  <pre><code>const express  = require("express")
  const app_port = process.env.PORT || 3000
  const app = express()
  const user_controller= require("./userController") //a file to handle user logins/signups
  const admin= require("./firebase-admin")() //firebase admin SDK
  
  app.set("view engine", "ejs")    
  
  app.get("/",(req, res) =&gt; {
      res.render("index", {title: "hello user"})
  })
  </code></pre>
  
  <p>I have a form input in a ejs file (with user name and password):</p>
  
  <pre><code>&lt;form id="login_form" method="post" action="/login"&gt;
                &lt;input name="email" type="email" placeholder="Email..." required/&gt;
                &lt;input name="password" type="password" placeholder="Password..." required/&gt;
                &lt;button type="submit" value="Login to Account"&gt;Login to Account&lt;/button&gt; 
                &lt;a href="forgotpassword"&gt;forgot password?&lt;/a&gt;&lt;br&gt;&lt;br&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>according to that guide I need to add https://www.gstatic.com/fireba)js/7.14.3/firebase-app.js" 
  I managed to do in pure html, but can't add  to an ejs file cause it works with &lt;% %> tags  instead of  but then I didn't find how to import a js file from an url.</p>
  
  <p>most of my ejs files work with the database so if I want to use that app I want to post it in one file and then import that partial ejs file into them.</p>