-
Notifications
You must be signed in to change notification settings - Fork 239
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
StandardScrypt has incorrect key for MemoryCost when creating http request #489
Comments
Hi @VictorKeil Thank you filing this issue. You are right! It looks like Hi @prameshj, according to the REST API it looks like |
For this specific issue, I think we just need to modify this line from"memoryCost" to "cpuMemoryCost" as Victor pointed out.
firebase-admin-go/snippets/auth.go Line 519 in bb055ed
I think it makes sense to have the single exposed field and internally write them to the specific api request field. |
/assign @VictorKeil |
This should be now fixed in #508 |
Describe your environment
Describe the problem
ImportUsers request failed with INVALID_HASH_PARAMETERS. After digging through the code and comparing with the Node SDK I noticed that the key for
hash.StandardScrypt.MemoryCost
was different between the two. When marshaling the hash config into an http request, the correct key for that field is"cpuMemCost"
, as opposed to"memoryCost"
, which is the current value.Steps to reproduce:
Make an ImportUsers request with
hash.StandardScrypt
hash config as an option.Relevant Code:
Firebase response:
Fix:
Just change the key value returned from
hash.StandardScrypt.Config()
to"cpuMemCost"
. Should I just do this with a PR? Your guidelines said to post an issue first. Thanks!The text was updated successfully, but these errors were encountered: