Which part of the private key for service accounts in Google Cloud Platform do I actually use?

后端 未结 1 681
面向向阳花
面向向阳花 2020-12-22 07:03

I am trying to verify I have the private_key correct as described in this SO question.

Docs about service account private keys are here.



        
1条回答
  •  囚心锁ツ
    2020-12-22 07:26

    This question is also related to another question, so look out for similar symptoms when debugging.

    Troubleshooting steps:

    1. Verify that the JSON file is the one generated for your service acocunt
    2. Verify that the JSON file is being read properly.
    3. Verify that you are using the correct Firebase methods

    Conclusion:

    This issue with Firebase authentication was caused by a malfunctioning JSON reading.

    It's important to note that the private keys are meant to be used with the "useless" information, since the method to decode the private key is expecting those strings to be there.

    TL;DR

    The problem was reading the JSON file correctly.

    Thanks to @Tanaike and @Tedinoz for the troubleshooting steps.

    0 讨论(0)
提交回复
热议问题