title: admin.auth().setCustomUserClaims "is not a function"
body: <p>In a Firebase Cloud Function running Express, I am attempting to set custom user claims when a client posts a token to a <code>setCustomClaims</code> route. When I call <code>admin.auth().setCustomUserClaims(uid, {admin: true})</code> within that route, I get an error saying this is "not a function." </p>
  
  <p>My authentication provider is the email/password provider via Firebase authentication (i.e. I am not creating custom tokens). </p>
  
  <p><strong>Do I have to be creating custom tokens to set custom user claims?</strong></p>
  
  <p>Here is my cloud function code:</p>
  
  <pre><code>const functions = require('firebase-functions');
  const admin = require("firebase-admin");
  import express from "express"
  
  admin.initializeApp(functions.config().firebase);
  const app = express()
  
  app.post('/setCustomClaims', (req, res) =&gt; {
      uid = "some-uid"
      admin.auth().setCustomUserClaims(uid, {admin:true}).then(()=&gt; {
          res.end(JSON.stringify( { status: 'success' } ) );
      })
  });
  
  export let api = functions.https.onRequest((request, response) =&gt; {
    if (!request.path) {
      request.url = `/${request.url}` // prepend '/' to keep query params if any
    }
    return app(request, response)
  })
  </code></pre>