atuinsh/atuin · info

authentication canceled

Error message

authentication canceled

What it means

During `atuin ai` inline setup, Atuin prompts the user to press Enter to begin Hub authentication (Esc cancels). If the user cancels, `wait_for_login_confirmation` returns false and the command bails with this error. It is an intentional user-initiated abort, not a failure.

Solutions

  1. Re-run the command and press Enter to proceed with authentication
  2. Complete Hub login later via `atuin login` or the AI setup flow
  3. If cancelation was unintended, just retry — no state is corrupted
Defensive patterns

Strategy: try-catch

Try / catch

match cmd.await {
    Err(e) if e.to_string().contains("authentication canceled") => {
        // expected user abort — no action needed
    }
    Err(e) => eprintln!("ai setup failed: {e}"),
    Ok(_) => {}
}

Prevention

When it happens

Trigger: Running the inline AI command's `ensure_hub_session` flow and pressing Esc (or otherwise aborting) at the 'Press enter to begin (or esc to cancel)' prompt.

Common situations: A user changing their mind about authenticating with Atuin Hub, or accidentally pressing Esc / Ctrl-C at the confirmation prompt.

Understand the failure class

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/f9b83e124afbf662. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin-ai/src/commands/inline.rs:122

    let hub_address = settings.hub_endpoint();
    let will_sync = settings.is_hub_sync();

    info!("No Hub session found, prompting for authentication");

    println!("Atuin AI requires authenticating with Atuin Hub.");
    if will_sync {
        println!(
            "Once logged in, your shell history will be synchronized via Atuin Hub if auto_sync \
             is enabled or when manually syncing."
        );
    }
    println!(
        "If you have an existing Atuin sync account, you can log in with your existing \
         credentials."
    );
    println!("Press enter to begin (or esc to cancel).");
    if !wait_for_login_confirmation()? {
        bail!("authentication canceled");
    }

    debug!("Starting Atuin Hub authentication...");
    println!("Authenticating with Atuin Hub...");

    let session = atuin_client::hub::HubAuthSession::start(&hub_address).await?;
    println!("Open this URL to continue:");
    println!("{}", session.auth_url);

    let token = session
        .wait_for_completion(
            atuin_client::hub::DEFAULT_AUTH_TIMEOUT,
            atuin_client::hub::DEFAULT_POLL_INTERVAL,
        )
        .await?;

    info!("Authentication complete, saving session token");
    atuin_client::hub::save_session(&token).await?;

View on GitHub (pinned to 900007c480)