doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
637 stars 87 forks source link

`rbw login` fails with 'Username or password is incorrect', while `bw login` succeeds #150

Closed rpdelaney closed 9 months ago

rpdelaney commented 9 months ago
$ rbw register  # Registration fails with 500
rbw register: failed to log in to bitwarden instance: api request returned error: 5000
$ rbw register  # If I use wrong keys, I get a different error (suggesting the problem is not a wrong key)
rbw register: failed to log in to bitwarden instance: incorrect api key

Did the SaSS API get updated?

rpdelaney commented 9 months ago

I did not set the base URL in the config. Although the README suggests the default will be used if unset, having set it explicitly, I am now met with a 404:

$ rbw config show
{
  "email": "REDACTED",
  "base_url": "https://api.bitwarden.com/",
  "identity_url": null,
  "notifications_url": null,
  "lock_timeout": 3600,
  "sync_interval": 3600,
  "pinentry": "pinentry",
  "client_cert_path": null
}
$ rbw register
rbw register: failed to log in to bitwarden instance: api request returned error: 404
rpdelaney commented 9 months ago

Not knowing where to go next, I did rbw config unset base_url and then I was able to register. No idea what was going on there, but if it works it works.

rpdelaney commented 9 months ago

login with bw-cli vs rbw:

$ bw login
? Email address: REDACTED
? Master password: [hidden]
You are logged in!

To unlock your vault, set your session key to the `BW_SESSION` environment variable. ex:
  $ export BW_SESSION="REDACTED"
  $env:BW_SESSION=REDACTED"

You can also pass the session key to any command with the `--session` option. ex:
  $ bw list items --session REDACTED
$ rbw login
rbw login: failed to log in to bitwarden instance: Username or password is incorrect. Try again.
$
yazgoo commented 9 months ago

isn't it a duplicate of https://github.com/doy/rbw/issues/145

rpdelaney commented 9 months ago

Looks like it has become a duplicate yep. Thank you!