Skip to content

Allow edited access tokens to be set to never expire#1694

Merged
binwiederhier merged 1 commit into
binwiederhier:mainfrom
ShipItAndPray:fix/token-expiration-never-edit
Apr 11, 2026
Merged

Allow edited access tokens to be set to never expire#1694
binwiederhier merged 1 commit into
binwiederhier:mainfrom
ShipItAndPray:fix/token-expiration-never-edit

Conversation

@ShipItAndPray
Copy link
Copy Markdown

Summary

This fixes the web account token editor so an existing token can be changed to never expire.

Before this change, the edit dialog offered a "never" option, but the PATCH request omitted the expires field when 0 was selected. The server interpreted that as "leave unchanged", so the expiration could only be moved to a future timestamp, not to no expiration.

Changes included:

  • send expires: 0 from the web client when the edit dialog selects "never"
  • add a server regression test covering PATCH /v1/account/token with expires: 0

Closes #1693.

Validation

  • git diff --check
  • cd web && npm ci
  • cd web && npm run lint -- --ext .js,.jsx ./src/app/AccountApi.js ./src/components/Account.jsx

Notes:

  • The local Go toolchain in this environment is go1.13, while the repo declares go 1.25.0, so I did not claim a meaningful local go test run from this machine.

@binwiederhier binwiederhier merged commit a063e2b into binwiederhier:main Apr 11, 2026
@binwiederhier
Copy link
Copy Markdown
Owner

Thanks

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.

can't change expiration time of an access toke

3 participants