feat: unify Telegram and Discord accounts via identity linking #93

Closed
Toutsu wants to merge 0 commits from feature/issue-35-identity-linking into main
Owner

Summary

Реализует связывание Telegram и Discord identity в единый аккаунт (issue #35, milestone v3.0).

Changes

  • БД: миграция V020 — таблицы player_links (secondary → primary) и identity_audit_log (security audit trail)
  • SessionService: методы ResolveEffectivePlayerId, LinkIdentity, UnlinkIdentity, GetLinkedIdentities + effective-id resolution во всех permission-методах
  • Auth: Discord callback автоматически делает LinkIdentity если пользователь уже залогинен через другую платформу
  • API: /api/me/identities (GET/DELETE) для управления связками
  • UI: новая страница Profile.razor + ссылка в NavMenu
  • Версия: bump до 3.0.0 во всех 4 файлах

Test plan

  • 265 tests pass
  • FakeSessionStore обновлён под новый ISessionStore
  • Version sync tests обновлены

Workflow

  • CI passes
  • Code review approved
  • Deployed
  • Release published
## Summary Реализует связывание Telegram и Discord identity в единый аккаунт (issue #35, milestone v3.0). ## Changes - **БД**: миграция V020 — таблицы `player_links` (secondary → primary) и `identity_audit_log` (security audit trail) - **SessionService**: методы `ResolveEffectivePlayerId`, `LinkIdentity`, `UnlinkIdentity`, `GetLinkedIdentities` + effective-id resolution во всех permission-методах - **Auth**: Discord callback автоматически делает `LinkIdentity` если пользователь уже залогинен через другую платформу - **API**: `/api/me/identities` (GET/DELETE) для управления связками - **UI**: новая страница `Profile.razor` + ссылка в `NavMenu` - **Версия**: bump до 3.0.0 во всех 4 файлах ## Test plan - [x] 265 tests pass - [x] FakeSessionStore обновлён под новый ISessionStore - [x] Version sync tests обновлены ## Workflow - [ ] CI passes - [ ] Code review approved - [ ] Deployed - [ ] Release published
Toutsu added 1 commit 2026-05-25 13:52:19 +03:00
feat: unify Telegram and Discord accounts via identity linking
PR Checks / test-and-build (pull_request) Successful in 7m6s
baa25f2e1e
- Add V020 migration: player_links + identity_audit_log tables
- Add ISessionStore methods: ResolveEffectivePlayerId, LinkIdentity, UnlinkIdentity, GetLinkedIdentities
- Update SessionService to resolve effective player id for all permission checks
- Add /auth/discord/callback linking flow when already authenticated
- Add /api/me/identities GET/DELETE endpoints
- Add Profile.razor page for managing linked accounts
- Update NavMenu with profile link and v3.0.0 badge
- Bump version to 3.0.0 across all files

Bump version → 3.0.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Toutsu added 1 commit 2026-05-25 14:00:38 +03:00
fix: connection leak in UpsertDiscordUserAsync + false conflict in LinkIdentityAsync
PR Checks / test-and-build (pull_request) Successful in 7m25s
9c59240f48
- UpsertDiscordUserAsync: restore await using on opened connection
- LinkIdentityAsync: compute effectiveCurrentPrimary before existingLink check
  to prevent false conflict when current user is a secondary identity

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Toutsu closed this pull request 2026-05-25 14:17:00 +03:00
Some checks are pending
PR Checks / test-and-build (pull_request) Successful in 7m25s

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Toutsu/GmRelayBot#93