title: FirebaseAuth Defaultinstance is null / .net core
body: <p>I have an ionic/angular frontend where I have the user registration via firebase. I already retrieve my firebase token, send it to my .net backend and verify the token with the [Authorize] annotation.</p>
  <p>After authorization, I want to decode the token and use the id of the user for further processing.</p>
  <ol>
  <li><p>Step get the token from the &quot;Authorization&quot; header</p>
  <pre><code>     string authHeader = this.HttpContext.Request.Headers[&quot;Authorization&quot;];
       var decodedFirebaseToken = await fireBaseAuthenticationHelper.GetUserFromFirebaseIdAsync(authHeader.Substring(&quot;Bearer &quot;.Length).Trim());
  </code></pre>
  </li>
  <li><p>Step retrieve the decoded token</p>
  <pre><code> public async Task&lt;FirebaseToken&gt; GetUserFromFirebaseIdAsync(string token)
   {
       FirebaseToken decodedToken = await FirebaseAuth.DefaultInstance
                               .VerifyIdTokenAsync(token);
  
       return decodedToken;
   }
  </code></pre>
  </li>
  </ol>
  <p>The problem now is that the FirebaseAuth.DefaultInstance is always null and throws a null pointer exception. I don't know where or how to initialize the DefaultInstance.
  On the FirebaseAuth class is a comment:</p>
  <pre><code>public sealed class FirebaseAuth : IFirebaseService
      {
          //
          // Summary:
          //     Gets the auth instance associated with the default Firebase app. This property
          //     is null if the default app doesn't yet exist.
          public static FirebaseAuth DefaultInstance { get; }
  </code></pre>
  <p>So I am pretty sure I have to initialize it somewhere but I can't find where.</p>