mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #5641] Missing ForcePasswordReset on API key login responses #2209
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#2209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TymanWasTaken on GitHub (Feb 26, 2025).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/5641
Vaultwarden Support String
Your environment (Generated via diagnostics page)
Config & Details (Generated via diagnostics page)
Show Config & Details
Config:
Vaultwarden Build Version
1.33.2
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
caddy 2.8.4
Host/Server Operating System
Linux
Operating System Version
Ubuntu 24.04.1 aarch64
Clients
Rust SDK
Client Version
Rust SDK v1.0.0
Steps To Reproduce
ForcePasswordResetExpected Result
API Key login with scope
apishould return a JSON response includingForcePasswordResetkey, to enable proper parsing by the Bitwarden Rust SDKActual Result
Login response does not include the
ForcePasswordResetkey, causing the rust SDK to assume the response is a refresh token response, causing a panic:Logs
Screenshots or Videos
No response
Additional Context
I am not entirely sure whether this is technically an issue with Vaultwarden or the Bitwarden SDK, but given Vaultwarden attempts to maintain compatibility with all Bitwarden Clients (which technically includes the Rust SDK), I figured I would report it here first.
To summarize the issue, I am attempting to develop a Rust program that interfaces with my personal Vaultwarden server, however when trying to login to the Vaultwarden server via API key, the SDK panicked, mentioning how it received a refresh_token response instead of a login response. After using a MITM proxy to get the API requests, I noticed the only difference from what Bitwarden's SDK was expecting and what was being returned was a missing
ForcePasswordResetproperty.Looking at
github.com/dani-garcia/vaultwarden@871a3f214a/src/api/identity.rs, I notice that the_password_loginfunction includes this property, but not_user_api_key_loginfor whatever reason, so the only change that should be needed is adding that property to the other function.