Skip to content

feat(sponsor-panel): add Thoth token issuance card - #1196

Merged
Xe merged 2 commits into
mainfrom
Xe/thoth-token-issuance
Apr 1, 2026
Merged

feat(sponsor-panel): add Thoth token issuance card#1196
Xe merged 2 commits into
mainfrom
Xe/thoth-token-issuance

Conversation

@Xe

@Xe Xe commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a self-service dashboard card that lets $1+/month sponsors generate Thoth API tokens
  • Uses lazy Thoth user creation: provisions a Thoth user on first token request, persists the ID on PanelUser, and skips creation on subsequent requests
  • Includes copy-to-clipboard button, empty email guard, and HTMX double-click prevention

Test plan

  • go build ./cmd/sponsor-panel compiles
  • Log in as a sponsor, verify Thoth API Token card appears on dashboard
  • Click "Generate Token", verify credentials are displayed with copy button
  • Click "Generate Token" again, verify no duplicate user creation error
  • Verify thoth_user_id column is populated in the database after first generation
  • Test with a non-sponsor user, verify the card does not appear

Xe added 2 commits April 1, 2026 18:40
Signed-off-by: Xe Iaso <me@xeiaso.net>
Add a self-service dashboard card that lets $1+/month sponsors generate
Thoth API tokens. Uses lazy user creation: on first token generation,
creates a Thoth user via AdminUsers.Create and persists the ID on the
PanelUser model. Subsequent requests skip creation and go straight to
MakeJWT.

Includes empty email guard, HTMX double-click prevention, copy to
clipboard button, and instructional text for Anubis/Botstopper deployment.
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / protobuf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedApr 1, 2026, 6:54 PM

@Xe
Xe merged commit a124314 into main Apr 1, 2026
4 checks passed
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