Skip to content
Open
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
9 changes: 7 additions & 2 deletions examples/fxa-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 => {
Expand Down