title: Validating Firebase user on existing WebApi rest service
body: <p>I would like to try to implement user validation on a .Net WebApi rest service that i currently have build.  I have two mobile apps build that communicate with the rest service. Implementing Firebase Auth (facebook, google) is relatively straight forward on the mobile side. How ever I am having trouble figuring out the best way to validate that user on my WebApi.  The process that I thought I could take would be:</p>
  
  <ol>
  <li>Client login on mobile retrieve token from Firebase</li>
  <li>Existing WebApi validate token against Firebase</li>
  <li>Allow access to Rest services </li>
  </ol>
  
  <p>I have looked at the RestSharp libraries as well as the .net library for generating a firebase token.  Is there a endpoint i can hit to grab users or check if a user is valid?  </p>
  
  <p>EDIT</p>
  
  <p>I was going down the path of using a JWT token.  Questions with this, what do I encrypt. And what endpoint do I try to query the user.</p>
  
  <p><code>var tokenGenerator = new Firebase.TokenGenerator(secretKey);
              var authPayload = new Dictionary&lt;string, object&gt;()
              {
                { "uid", "9ioA6m........3m1EG93" },
                { "provider", "facebook" },
                { "data", "here" }
              };
              string token = tokenGenerator.CreateToken(authPayload);
  </code></p>
  
  <p>Thanks</p>