Skip to content

Vercel and firebase private key issue #417

Answered by kmjennison
jamiegood asked this question in Q&A
Discussion options

You must be logged in to vote

When validating whether the private key is set or not set, this library only cares about the following:

  • on the server side, the value must be defined
  • on the client side, the value cannot be defined

Though the config is initialized in the same code for the server and client, it can (and should) contain different values.

It seems like the difficult part in your case is fetching the private key value prior to loading the app. You might approach this with middleware or a higher-order function that gets the private key server-side and passes it to the composed function that initializes next-firebase-auth.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jamiegood
Comment options

Answer selected by jamiegood
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants