pub async fn exchange(
pool: &PgPool,
code: &str,
verifier: &str,
sso_idle_days: u32,
) -> AppResult<DesktopToken>Expand description
Exchanges a one-time code plus the PKCE verifier for a personal access
token. Every failure looks the same to the caller. The token expires
after TOKEN_DAYS without use – for a single sign-on user after
sso_idle_days if that is shorter (TEAMCRAFT_OIDC_TOKEN_IDLE_DAYS).