Skip to content

Fix headless authentication for accounts without billing plans - #18

Open
Microck wants to merge 1 commit into
paperfoot:mainfrom
Microck:fix/headless-billing-auth
Open

Microck wants to merge 1 commit into
paperfoot:mainfrom
Microck:fix/headless-billing-auth

Conversation

@Microck

@Microck Microck commented Oct 7, 2026

Copy link
Copy Markdown

valid headless login failed because the billing parser required a plan object that suno omits for some authenticated accounts. the expiry check also rejected jwt-only sessions 30 minutes before their actual expiry, even when suno still accepted them.

make plan optional display metadata, keep total_credits_left required, and omit the plan label when it is absent. use the jwt's actual exp claim for local expiry checks. server-side rejection still uses the existing refresh-or-error path.

validation:

  • cargo fmt --check
  • cargo clippy --locked --release --bin suno -- -D warnings
  • cargo build --locked --release with lower-memory profile settings on the local arm64 host
  • 14 scoped auth, billing, and cli unit tests passed, compiled with rustc --test against the built dependencies
  • both failures reproduced against the unpatched v0.10.1 code
  • live auth --jwt-stdin, saved-session auth, and json/table credits checks passed; verified again after the old 30-minute cutoff
  • saved credentials have mode 0600; no music was generated

the full cargo test suite was not run locally because the host is under memory and disk pressure. the existing ci workflow runs it.

the billing issue overlaps #4, #7, #11, and #17. this patch stays focused on optional plan metadata and jwt-only session expiry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant