Skip to content
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

feat: Working passkeys storage #4025

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/api/core/ciphers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ pub struct CipherData {
Login = 1,
SecureNote = 2,
Card = 3,
Identity = 4,
Fido2Key = 5
Identity = 4
*/
pub Type: i32,
pub Name: String,
Expand All @@ -225,7 +224,6 @@ pub struct CipherData {
SecureNote: Option<Value>,
Card: Option<Value>,
Identity: Option<Value>,
Fido2Key: Option<Value>,

Favorite: Option<bool>,
Reprompt: Option<i32>,
Expand Down Expand Up @@ -468,7 +466,6 @@ pub async fn update_cipher_from_data(
2 => data.SecureNote,
3 => data.Card,
4 => data.Identity,
5 => data.Fido2Key,
_ => err!("Invalid type"),
};

Expand Down
3 changes: 2 additions & 1 deletion src/api/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ fn config() -> Json<Value> {
// Any feature flags that we want the clients to use
// Can check the enabled ones at:
// https://vault.bitwarden.com/api/config
"autofill-v2": true
"autofill-v2": true,
"fido2-vault-credentials": true
},
"object": "config",
}))
Expand Down
5 changes: 1 addition & 4 deletions src/db/models/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ db_object! {
Login = 1,
SecureNote = 2,
Card = 3,
Identity = 4,
Fido2key = 5
Identity = 4
*/
pub atype: i32,
pub name: String,
Expand Down Expand Up @@ -229,7 +228,6 @@ impl Cipher {
"SecureNote": null,
"Card": null,
"Identity": null,
"Fido2Key": null,
});

// These values are only needed for user/default syncs
Expand Down Expand Up @@ -258,7 +256,6 @@ impl Cipher {
2 => "SecureNote",
3 => "Card",
4 => "Identity",
5 => "Fido2Key",
_ => panic!("Wrong type"),
};

Expand Down