Support multiple authenticated Twitch and YouTube accounts per alert #97

Closed
opened 2026-07-03 02:13:50 -05:00 by Gitchegumi · 0 comments
Gitchegumi commented 2026-07-03 02:13:50 -05:00 (Migrated from github.com)

Problem

The app needs to support more than one authenticated Twitch account and more than one authenticated YouTube account.

Authenticating multiple accounts is only useful if alerts can target specific accounts. An alert should not automatically fire for every authenticated account just because the workspace has access to those accounts.

The Alerts editor needs account targeting controls so each alert/listener can decide which authenticated account or accounts it listens to.

Required behavior

Users should be able to:

  1. Authenticate multiple Twitch accounts.
  2. Authenticate multiple YouTube accounts/channels.
  3. See the authenticated accounts clearly labeled in the UI.
  4. Create or edit an alert and choose which authenticated account or accounts that alert listens to.
  5. Select multiple accounts for a single alert.
  6. Prevent an alert from firing for accounts that were not selected for that alert.

Alerts editor requirements

In the Alerts editor, add an account targeting control for platform-backed alerts.

Expected behavior:

  • Twitch alerts should show a Twitch account multi-select when authenticated Twitch accounts exist.
  • YouTube alerts should show a YouTube account/channel multi-select when authenticated YouTube accounts exist.
  • Users must be able to select one or more accounts for the alert.
  • The selected accounts should be saved as part of the alert configuration.
  • The editor should make it obvious when no accounts are authenticated yet and point the user back to Settings -> Integrations.
  • The editor should not silently default to "all accounts" unless that is an explicit user-selected option.

Event matching / firing behavior

When an event arrives from Twitch or YouTube, the alert matching logic must check both:

  1. The alert/platform/event type criteria.
  2. Whether the event came from one of the accounts selected for that alert.

An alert should only fire if the incoming event's platform account/channel matches one of the alert's selected authenticated accounts.

Data model considerations

Implement whatever data model is appropriate, but the system needs a durable relationship between:

  • workspace/channel
  • authenticated platform account
  • alert configuration

Potential approaches:

  • Associate linked accounts with a workspace/channel, then let alerts reference those workspace-linked account IDs.
  • Keep linked accounts user-owned but add a workspace/account join table, then let alerts reference the workspace-linked accounts.
  • Store selected account IDs inside the alert configuration if that fits the existing alert schema cleanly.

Do not rely only on "primary account" behavior. Primary account may be useful as a default, but it is not enough for this feature.

Acceptance criteria

  • Multiple Twitch accounts can be authenticated and displayed.
  • Multiple YouTube accounts/channels can be authenticated and displayed.
  • The Alerts editor exposes a multi-select account targeting control for Twitch alerts.
  • The Alerts editor exposes a multi-select account targeting control for YouTube alerts.
  • Each alert can be configured to listen to one or more authenticated accounts.
  • Alerts do not fire for authenticated accounts that are not selected for that alert.
  • The event ingestion/matching pipeline carries enough account identity to enforce the selection.
  • If no accounts exist for a platform, the Alerts editor shows a useful empty state instead of a broken selector.
  • Existing alerts are migrated safely or forced into an explicit account-selection state so they do not unexpectedly fire for every authenticated account.
  • Tests cover account selection persistence and event filtering by selected account.

Notes

There is still broader work needed on the Alerts editor, but this issue is specifically for authenticated account targeting and multi-account alert scoping.

The goal is to make multi-account authentication safe and predictable before the editor grows more complex.

## Problem The app needs to support more than one authenticated Twitch account and more than one authenticated YouTube account. Authenticating multiple accounts is only useful if alerts can target specific accounts. An alert should not automatically fire for every authenticated account just because the workspace has access to those accounts. The Alerts editor needs account targeting controls so each alert/listener can decide which authenticated account or accounts it listens to. ## Required behavior Users should be able to: 1. Authenticate multiple Twitch accounts. 2. Authenticate multiple YouTube accounts/channels. 3. See the authenticated accounts clearly labeled in the UI. 4. Create or edit an alert and choose which authenticated account or accounts that alert listens to. 5. Select multiple accounts for a single alert. 6. Prevent an alert from firing for accounts that were not selected for that alert. ## Alerts editor requirements In the Alerts editor, add an account targeting control for platform-backed alerts. Expected behavior: - Twitch alerts should show a Twitch account multi-select when authenticated Twitch accounts exist. - YouTube alerts should show a YouTube account/channel multi-select when authenticated YouTube accounts exist. - Users must be able to select one or more accounts for the alert. - The selected accounts should be saved as part of the alert configuration. - The editor should make it obvious when no accounts are authenticated yet and point the user back to Settings -> Integrations. - The editor should not silently default to "all accounts" unless that is an explicit user-selected option. ## Event matching / firing behavior When an event arrives from Twitch or YouTube, the alert matching logic must check both: 1. The alert/platform/event type criteria. 2. Whether the event came from one of the accounts selected for that alert. An alert should only fire if the incoming event's platform account/channel matches one of the alert's selected authenticated accounts. ## Data model considerations Implement whatever data model is appropriate, but the system needs a durable relationship between: - workspace/channel - authenticated platform account - alert configuration Potential approaches: - Associate linked accounts with a workspace/channel, then let alerts reference those workspace-linked account IDs. - Keep linked accounts user-owned but add a workspace/account join table, then let alerts reference the workspace-linked accounts. - Store selected account IDs inside the alert configuration if that fits the existing alert schema cleanly. Do not rely only on "primary account" behavior. Primary account may be useful as a default, but it is not enough for this feature. ## Acceptance criteria - Multiple Twitch accounts can be authenticated and displayed. - Multiple YouTube accounts/channels can be authenticated and displayed. - The Alerts editor exposes a multi-select account targeting control for Twitch alerts. - The Alerts editor exposes a multi-select account targeting control for YouTube alerts. - Each alert can be configured to listen to one or more authenticated accounts. - Alerts do not fire for authenticated accounts that are not selected for that alert. - The event ingestion/matching pipeline carries enough account identity to enforce the selection. - If no accounts exist for a platform, the Alerts editor shows a useful empty state instead of a broken selector. - Existing alerts are migrated safely or forced into an explicit account-selection state so they do not unexpectedly fire for every authenticated account. - Tests cover account selection persistence and event filtering by selected account. ## Notes There is still broader work needed on the Alerts editor, but this issue is specifically for authenticated account targeting and multi-account alert scoping. The goal is to make multi-account authentication safe and predictable before the editor grows more complex.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gitchegumi/GitchAlerts#97
No description provided.