title: Setting up firebase v3 custom auth with php
body: <p>I'm trying to set up  custom auth with the new firebase sdk from google following those guidelines : <a href="https://firebase.google.com/docs/auth/server#use_a_jwt_library">https://firebase.google.com/docs/auth/server#use_a_jwt_library</a><br>
  In the samble code it says : </p>
  
  <blockquote>
    <p>Get your service account's email address and private key from the JSON key file</p>
  </blockquote>
  
  <p>Unfortunately I have not idea where to get this json file. If I go to my firebase console (<a href="https://console.firebase.google.com/">https://console.firebase.google.com/</a>) I manage to donwload a json file but it does not contain any email adress and private key.</p>
  
  <p>I managed to find a json file that contains an email adress and a private key in my google cloud platform console (<a href="http://console.cloud.google.com">http://console.cloud.google.com</a>) by goind into the "API Manager > Credentials" menu. Surprisingly my firebase app was showed there. I copy and pasted the email and key into the sample code, then I got this error : </p>
  
  <blockquote>
    <p>Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /volume1/web/yeti/vendor/firebase/php-jwt/src/JWT.php on line 183 Fatal error: Uncaught exception 'DomainException' with message 'OpenSSL unable to sign data' in /volume1/web/yeti/vendor/firebase/php-jwt/src/JWT.php:185 Stack trace: #0 /volume1/web/yeti/vendor/firebase/php-jwt/src/JWT.php(154): Firebase\JWT\JWT::sign('eyJ0eXAiOiJKV1Q...', NULL, 'RS256') #1 /volume1/web/yeti/jwt.php(21): Firebase\JWT\JWT::encode(Array, NULL, 'RS256') #2 /volume1/web/yeti/jwt.php(24): create_custom_token('1234', false) #3 {main} thrown in /volume1/web/yeti/vendor/firebase/php-jwt/src/JWT.php on line 185</p>
  </blockquote>
  
  <p>Does someone has an idea of what I'm doing wrong ?</p>
  
  <p>Thanks</p>