title: Is it possible to incorporate Firebase Auth into ASP.NET Core MVC?
body: <p>I am working to build an Ionic mobile application, and I plan to use Firebase's auth and realtime database offerings. I am trying to understand if it's possible to also incorporate Firebase auth into the server-side processing within an associated ASP.NET Core MVC site. This would allow me to use some 'static' server-side pages to handle subscriptions, payments, etc but still leverage the same Firebase-based user scheme as the mobile app.</p>
  
  <p>I know Firebase is geared towards javascript clients, and I found <a href="https://blog.markvincze.com/secure-an-asp-net-core-api-with-firebase/" rel="noreferrer">this example of authenticating a request that includes an <code>Authorization</code> header within an API</a> within asp.net core, so it's possible to validate a firebase token in the asp.net pipeline. However, this assumes a javascript client is making all requests, and I'd like to instead have the token stored in some cookie that I can have the browser seamlessly provide. This would let me handle authentication on static, non-javascript pages within my app.</p>
  
  <p>I'm thinking there must be some way to initiate authentication against firebase, and have the response redirected to an MVC action. Then you could presumably set an "indentity" cookie within asp.net that would persist across page refreshes. Or am I just way off base on my understanding of how this works?</p>
  
  <p><strong>Comment on possible duplicate of <a href="https://stackoverflow.com/questions/39190512/firebase-authentication-asp-net-core">Firebase authentication asp.net core</a>:</strong></p>
  
  <p>This is not a dupe in my opinion because that question is talking about verifying a JWT token provided by a client (presumably javascript). I believe the link I included originally demonstrates a way to solve that problem.</p>