mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Self-hosted instance returning invalid username or password error #11

Closed 132ikl closed 4 years ago

132ikl commented 4 years ago

Config:

email = 132@ikl.sh
apiURL = https://bw.ikl.sh/api/
idURL = https://bw.ikl.sh/identity/

Output:

$ bitw login
error: could not login via password: Bad Request: {"error":"invalid_grant","error_description":"invalid_username_or_password","ErrorModel":{"Object":"error","Message":"Username or password is incorrect. Try again.","ValidationErrors":null,"ExceptionMessage":null,"ExceptionStackTrace":null,"InnerExceptionMessage":null}}

Data file:

{
    "DeviceID": "[redacted]",
    "AccessToken": "",
    "RefreshToken": "",
    "TokenExpiry": "0001-01-01T00:00:00Z",
    "KDF": 0,
    "KDFIterations": 100000,
    "LastSync": "0001-01-01T00:00:00Z",
    "Sync": {
        "Profile": {
            "ID": "",
            "Name": "",
            "Email": "",
            "EmailVerified": false,
            "Premium": false,
            "MasterPasswordHint": "",
            "Culture": "",
            "TwoFactorEnabled": false,
            "Key": "",
            "PrivateKey": "",
            "SecurityStamp": "",
            "Organizations": null
        },
        "Folders": null,
        "Ciphers": null,
        "Domains": {
            "EquivalentDomains": null,
            "GlobalEquivalentDomains": null
        }
    }
}
mvdan commented 4 years ago

Did you provide the correct username and password? The software works with the upstream bitwarden server.

132ikl commented 4 years ago

Yes, I provided the correct username and password. I am using bitwarden_rs. While not the official server, I find it hard to place blame on it since it works just fine with the web interface, firefox/chrome extensions, and the official command line client.

mk-f commented 4 years ago

idURL must be identityURL in the config-file.

mvdan commented 4 years ago

You're very correct, @mk-f - thanks for noticing that :) I'll teach the tool to complain about unknown options, to prevent other typos and confusion in the future.