title: Trying to set up a sign in through steam OpenID with Firebase
body: <p>I'm currently working on a project that will involve signing in through steam and I wanted to involve firebase. I found this guide(<a href="https://codepen.io/johnchristopherjones/post/setting-up-openid" rel="nofollow noreferrer">https://codepen.io/johnchristopherjones/post/setting-up-openid</a>) that looks great and shows the way to do so, but it looks like the way this guy set up firebase is now outdated. I'm new to this but I'm currently working on updating the code, but I'm getting errors and am in need of guidance of what to do next, or maybe I'm on the right path?</p>
  
  <p>Server.js</p>
  
  <pre><code>var express = require("express");
      var app = express();
      var session = require("express-session");
      var firebase = require("firebase")(session);
  
      var FirebaseStoreOptions = {
        host: "",
  
       token: "",
      reapInterval: 600000
       };
  
      app.use(
        (config = {
      apiKey: apiKey,
      authDomain: "firebaseapp.com",
      databaseURL: "",
      projectId: "",
        })
      );
  firebase.initializeApp(config);
  
  var openIdStrategy = require("password-openid").Strategy;
  var SteamStrategy = new OpenIDStrategy(
    {
      // OpenID provider configuration
      providerURL: "http://steamcommunity.com/openid",
      stateless: true,
      // How the OpenID provider should return the client to us
      returnURL: "http://localhost:4000/auth/openid/return",
      realm: "http://localhost:4000/"
    },
    function(identifier, done) {
      process.nextTick(function() {
        var user = {
          identifier: identifier,
          steamId: identifier.match(/\d+$/)[0]
        };
        return done(null, user);
      });
    }
  );
  
  var passport = require("passport");
  passport.use(SteamStrategy);
  passport.serializeUser(function(user, done) {
    done(null, user.identifier);
  });
  passport.deserializeUser(function(identifier, done) {
    // For this demo, we'll just return an object literal since our user
    // objects are this trivial.  In the real world, you'd probably fetch
    // your user object from your database here.
    done(null, {
      identifier: identifier,
      steamId: identifier.match(/\d+$/)[0]
    });
  });
  
  app.use(passport.initialize());
  app.use(passport.session());
  app.post("/auth/openid", passport.authenticate("openid"));
  app.get("/auth/openid/return", passport.authenticate("openid"), function(
    request,
    response
  ) {
    if (request.user) {
      response.redirect("/?steamid=" + request.user.steamId);
    } else {
      response.redirect("/?failed");
    }
  });
  app.post("/auth/logout", function(request, response) {
    request.logout();
    // After logging out, redirect the user somewhere useful.
    // Where they came from or the site root are good choices.
    response.redirect(request.get("Referer") || "/");
  });
  app.get("/", function(request, response) {
    response.write("&lt;!DOCTYPE html&gt;");
    if (request.user) {
      response.write(
        (request.session.passport &amp;&amp; JSON.stringify(request.user)) || "None"
      );
      response.write('&lt;form action="/auth/logout" method="post"&gt;');
      response.write('&lt;input type="submit" value="Log Out"/&gt;&lt;/form&gt;');
    } else {
      if (request.query.steamid) {
        response.write("Not logged in.");
      }
      response.write('&lt;form action="/auth/openid" method="post"&gt;');
      response.write(
        '&lt;input name="submit" type="image" src="http://steamcommunity-a.' +
          'akamaihd.net/public/images/signinthroughsteam/sits_small.png" ' +
          'alt="Sign in through Steam"/&gt;&lt;/form&gt;'
      );
    }
    response.send();
  });
  var port = 4000;
  var server = app.listen(port);
  console.log("Listening on port " + port);
  </code></pre>
  
  <p>The only thing I've removed in the code above is my Firebase info for obvious reasons. The current error I have is <code>app.use() requires a middleware function</code>. Thanks for the help :)</p>