title: Firebase authentication for private server
body: <p>I am developoing a flutter app and want to use Firebase auth service to enable my users to signup/login using:</p>
  
  <ul>
  <li>email/pass</li>
  <li>google</li>
  <li>facebook</li>
  </ul>
  
  <p>I have a lumen backend REST server with MySQL database.</p>
  
  <p>Problem: Going through loads of firebase documentation I cannot understand the whole flow of how this should work.</p>
  
  <p>I can successfully create  users using the app and they appear in the firebase console, however, I don't know how to enable them to securely talk to my backend server. </p>
  
  <p>I would expect Firebase to release an access and refresh tokens for me to use for my private communication between the app and backend, like AWS cognito does. Instead, it issues an "ID Token" that is JWT token and should be verified on backend. But what do I do once it is verified? </p>
  
  <p>How do I link my users in my database to the authenticated user? What is the thing to store in the database to map to the authenticated user? </p>
  
  <p>Do I have to generate custom tokens via the Admin SDK? </p>
  
  <p>Or is the ID Token the thing that should be passed from client to backend on each request and then verified? But still, what do I put from this ID token to my database to link the authenticated user with their data?</p>