Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getUploadToken: ERR_CRYPTO_INVALID_STATE #50

Open
samsoncsyu7777 opened this issue May 9, 2020 · 7 comments
Open

getUploadToken: ERR_CRYPTO_INVALID_STATE #50

samsoncsyu7777 opened this issue May 9, 2020 · 7 comments

Comments

@samsoncsyu7777
Copy link

When a user enters PIN to upload, there is an error logged in Firebase functions getUploadToken: Unhandled error Error [ERR_CRYPTO_INVALID_STATE]: Invalid state for operation getAuthTag. What can I do to fix it?

@alexissinglaire
Copy link

@samsoncsyu7777 : Have you define the secret value in secret manager API?

How is the parameter configured inside config.ts under folder /functions/src/ for following parameters:

  • defaultAlgorithm
  • keyPath

@samsoncsyu7777
Copy link
Author

samsoncsyu7777 commented May 10, 2020 via email

@alexissinglaire
Copy link

Is your secret key name called 'EncryptionKey'? How you build the secret value? Are you using head command to create the secret value ?

Refer to this screenshot for the secret key name

#51 (comment)

@samsoncsyu7777
Copy link
Author

samsoncsyu7777 commented May 10, 2020 via email

@samsoncsyu7777
Copy link
Author

samsoncsyu7777 commented May 10, 2020 via email

@alexissinglaire
Copy link

Hi, can you give screenshot of your secret key name similar to sample.of screenshot I gave you?

If you use head command to create the secret value, then you need to define defaultAlgorithm value as aes-256-gcm.

@samsoncsyu7777
Copy link
Author

It works. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants