Why Firebase private key needed? #460
-
Hi, I’m new to NextJS, and I am struggling to understand why private key for Firebase is needed in this project. When using Firebase in react(not NextJS), all I need to use Firebase service in the client side is just a public key(and set of other info too but not private key). But, this project requires private key in .env file. I don’t see the necessities for it…why? I wish someone is kind enough to teach me the necessity for it. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's used to verify the user's ID token on the server side, which allows your app to use the user's ID during server-side rendering and in API functions. Verifying the ID token requires the Firebase admin app. |
Beta Was this translation helpful? Give feedback.
It's used to verify the user's ID token on the server side, which allows your app to use the user's ID during server-side rendering and in API functions. Verifying the ID token requires the Firebase admin app.