Skip to content

Commit b35d642

Browse files
fix: deserialize builder id token correctly when it is saved by the qchat binary (#424)
1 parent 3f8676b commit b35d642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/fig_auth/src/builder_id.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ use crate::{
7272
#[derive(Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
7373
pub enum OAuthFlow {
7474
DeviceCode,
75+
#[serde(alias = "Pkce")]
7576
PKCE,
7677
}
7778

@@ -647,6 +648,7 @@ mod tests {
647648
fn test_oauth_flow_ser_deser() {
648649
test_ser_deser!(OAuthFlow, OAuthFlow::DeviceCode, "DeviceCode");
649650
test_ser_deser!(OAuthFlow, OAuthFlow::PKCE, "PKCE");
651+
assert_eq!(OAuthFlow::PKCE, serde_json::from_str("\"Pkce\"").unwrap());
650652
}
651653

652654
#[test]

0 commit comments

Comments
 (0)