Open faisal00813 opened 2 years ago
Seems to be related to this
@faisal00813 did you fix it?
No. Still facing the same issue on Mac.
I'm experiencing the same issue. Is there a way/need to generate the keys for .near-credentials/testnet/*.json
such that it matches the public_key
param that is being passed up to the browser?
I notice that I don't have any public/private key paring on my local machine that matches the public_key
param passed with the URL, e.g. https://wallet.testnet.near.org/login/?referrer=NEAR+CLI&public_key=ksjdflaksjdf&success_url=http%3A%2F%2F127.0.0.1%3A5001
.
edit: Also it seems weird to have the success results point to a localhost server when nothing is running on that port.
According to this site: https://www.near-sdk.io/zero-to-hero/basics/set-up-skeleton,
When you typed near login, NEAR CLI generated a key pair: a private and public key. It kept the private key tucked away in a JSON file and sent the public key as a URL parameter to NEAR Wallet. The URL is long and contains other info instructing NEAR Wallet to "add a full access key" to the account. Our browser's local storage had a key (created when the account was made) that is able to do several things, including adding another key. It took the public key from the URL parameter, used it as an argument, and voilà: the testnet account has an additional key!
This apparently isn't happening, because no files are being added to .near-credentials
. Yet somehow, it's generating a public key to add to the URL.
I looked into the near-cli source code and found that there was a callback using port 5000. My Mac (Monterey 12.3.1) was using port 5000 already, which I couldn't kill off and which in turn led me to a quick Google search. All the articles basically say this:
Did so, and now I'm able to use near login
successfully.
Describe the bug Unable to login. Near-cli is failing with error: Failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field
account_id
To Reproduce Steps to reproduce the behaviour:
Expected behavior Should wait for the browser to authenticate
Screenshots
Desktop (please complete the following information):