Repository navigation
feat(links): link external accounts to players with one-time codes - #184
Open
TheMeinerLP wants to merge 8 commits into
Open
TheMeinerLP wants to merge 8 commits into
TheMeinerLP wants to merge 8 commits into
Conversation
Contributor
Test results 99 files 99 suites 1m 13s ⏱️ Results for commit 0de1209. |
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Otis becomes the registry for links between Minecraft players and external accounts (Discord, Twitch, YouTube, X, TikTok, GitHub).
POST /v1/players/{playerUuid}/link-codes.POST /v1/link-codes/redeem.XXXX-XXXX), 10 min TTL, single use, stored only as SHA-256.410 link-code-invalid(no oracle).external-account-already-linked/provider-already-linked) everything rolls back and the code stays usable.PUT /v1/players/{playerUuid}/links/{provider}(validated handle or https URL on the provider's domain). They never replace a verified link, and redeeming upgrades them.GET /v1/players/{uuid}/linkslists them;DELETE .../{provider}is idempotent (204).GET /v1/links/{provider}/{externalId}answers "who is this Discord user?" and only finds verified links.links.*carry provider, player uuid and outcome; codes and external ids never appear in spans or logs.AccountLinksApiin the hand-maintained spec 1.1.0.Planned service authentication (follow-up)
Service auth will use the OneLiteFeather SSO with JWT bearer tokens (client credentials, Micronaut Security JWT against the IdP's JWKS). In preparation, the endpoints are split into two controllers, so a scope can later be applied per group without breaking the API:
PlayerLinkController: the game sideLinkRedemptionController: the redeeming servicesUntil then Otis must stay reachable only internally, because redeem and lookup trust the caller's
externalId.Compatibility and migration (no data loss)
account_linkandlink_code(h2, postgresql, mariadb) and is additive only. Existing tables are untouched.ExistingDatabaseMigrationTestchecks that player and setting rows stay byte-identical across the migration. The V1-V3 scripts were applied to throwaway MariaDB 11 and PostgreSQL 17 containers.ExistingEndpointsCompatibilityTestis green). The clientjavapdiff is additions only (+247 lines, 0 removed).velocity-pluginbuilds unchanged, and its shadow JAR has nonet/kyoriclasses.Notes
TransactionOperations<Session>@Named("default"), which resolves toSpringHibernateTransactionOperations. Declarative@Transactionalis ambiguous here (two@Primarybeans). A rollback test proves that the repositories join the transaction.openspec/changes/add-account-links/design.mdunder "Implementation Notes":AccountLinksApi.add-account-link-events(Kafka outbox) andadd-link-commands(proxy commands).Test plan
./gradlew clean build: 318 tests, 0 failures, 1 skipped (pre-existing disabledOtisTest)https://claude.ai/code/session_012BmpdMdQ5wwagagQvfcq8S