Skip to content

Discord linking #8

@DisposableCrewmember42

Description

@DisposableCrewmember42

User-facing

  • Click button in Main Menu / Escape Menu to open Menu depending on linking state
    • Unlinked? Start the process
      Image
    • Linked? Display state and allow unlinking.
      Image
  • Discord: /link <auth_code> to proceed with linking
    • Optionally: If invoked without arguments, open one of those fancy Discord interaction dialogs to prompt for the auth code.

Linking Implementation

  • A new API endpoint is added to the SS14 Admin API at Content.Server/Administration/ServerApi.cs
    • POST /discord/actions/link
      {
        "auth_code": "A1B2C3",
        "discord_id": 12345678901234567890
      }
  1. Upon linking request, SS14 server generates auth code and holds in in memory with corresponding player GUID until invalidation.
  2. The bot sends an authenticated request to the above endpoint upon /link invocation.
  3. The server receives the request and checks the code. If code is valid, write to database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions