From d459dc90e15ded18fe5f2e330624faecacce9b5b Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Fri, 8 May 2026 12:37:50 +1000 Subject: [PATCH] fxa cli example now has an option for using or ignoring the access token cache --- examples/fxa-client/src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/fxa-client/src/main.rs b/examples/fxa-client/src/main.rs index a6318750e9..b3dba59d59 100644 --- a/examples/fxa-client/src/main.rs +++ b/examples/fxa-client/src/main.rs @@ -62,6 +62,8 @@ enum Command { /// * This time there shouldn't be a token exchange request, since the refresh token now has /// the relay scope. GetAccessToken { + #[arg(long)] + ignore_cache: bool, scope: String, }, /// Log in to FxA with the given scopes @@ -107,9 +109,12 @@ fn main() -> Result<()> { match command { Command::Devices(args) => devices::run(account, args)?, Command::SendTab(args) => send_tab::run(account, args)?, - Command::GetAccessToken { scope } => { + Command::GetAccessToken { + scope, + ignore_cache, + } => { println!("Requesting access token with scope: {scope}"); - let tok = account.get_access_token(&scope, false)?; + let tok = account.get_access_token(&scope, !ignore_cache)?; println!("Success: {tok:?}"); } Command::Disconnect => {