Use firebase auth as the authentication layer. Then once a user is authed in just use mongodb as per usual in node or Postgres in rails, django etc
You pass the token to the DB via HTTPS decrypt and off you go.
You pass the token to the DB via HTTPS decrypt and off you go.