title: Passport.js with openid-client strategy-- TypeError: client must be an instance of openid-client Client
body: <p>I'm building a MERN stack app using typescript. I'm using passport with openid-client strategy (<a href="https://github.com/panva/node-openid-client/blob/master/docs/README.md#strategy" rel="nofollow noreferrer">https://github.com/panva/node-openid-client/blob/master/docs/README.md#strategy</a>) for user auth. I'm getting the following typeError:</p>
  
  <p><code>TypeError: client must be an instance of openid-client Client</code></p>
  
  <p>I've tried using Issuer.discover and new Issuer(), and await/async, made sure node and all my packages are up to date, to no avail.</p>
  
  <p>This is the relevant code:</p>
  
  <pre><code>import { Issuer, Strategy, generators } from "openid-client";
  
  const googleClient = Issuer.discover("https://accounts.google.com/.well-known/openid-configuration")
      .then((googleIssuer: { Client: any; }) =&gt; {
          return googleIssuer.Client;
      });
  </code></pre>
  
  <p>It's supposed to return an openid-client Client instance, but it returns a pending promise.</p>