Discord integration

Your team's 2FA codes in Discord

A /otp command in Discord to get a shared account's 2FA code, visible only to you. Encrypted secrets, per-channel restrictions and an access log.

Demo interface. The codes are fictional.

Many product teams, studios and communities work in Discord. The Share Auth integration brings the 2FA codes of shared accounts there, without anyone having to keep the seed on their phone.

What the command does

  • /otp stripe returns the current code, the time it has left and the next code, with a button to get a fresh one.
  • /otp-list shows the accounts available in this channel, each with its own button.
  • /help lists the commands.

The name does not have to be exact: a few words from the name, the issuer or the description are enough, and if several accounts match, Discord offers you the candidates. Replies are ephemeral: only the person who ran the command sees them.

Who can get what

An integration opens access to the whole connected Discord server. Discord proves which server the command comes from, not which Share Auth account is running it, so team roles do not apply here. Three safeguards take their place:

  • per-channel restrictions, which limit each channel to the secrets it is allowed to obtain;
  • the access log, where every code handed out appears with the name sent by Discord and the time (the channel is recorded in the integration’s activity);
  • a per-person command limit, to stop bursts of requests.

Only the team owner can create, edit or disable the integration. Every call is checked against Discord’s signature: a request that does not come from your application is refused.

Setting up the integration

  1. In Share Auth, open Integrations and choose Discord under One-click connection.
  2. Discord asks which server to add the Share Auth bot to. The integration is created right away, with no credential to copy.
  3. Optional: turn on per-channel restrictions and link the secrets.

Prefer your own Discord application? Manual setup is still available: the page tells you where to find the bot token and the public key in the Discord Developer Portal, and gives you the URL to register as the interactions endpoint.

The integration’s page then shows its recent activity, refused commands included.

Frequently asked questions

No. The reply is ephemeral: only the person who ran the command sees it.