feat: Add Reddit and Twitch named providers (#294)

Adding auth support for future Reddit and Twitch tools.
This commit is contained in:
Nate Barbettini 2025-03-14 13:52:46 -07:00 committed by GitHub
parent f04087b389
commit ef5b19b4a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View file

@ -96,6 +96,15 @@ class Notion(OAuth2):
super().__init__(id=id, scopes=scopes)
class Reddit(OAuth2):
"""Marks a tool as requiring Reddit authorization."""
provider_id: str = "reddit"
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
super().__init__(id=id, scopes=scopes)
class Slack(OAuth2):
"""Marks a tool as requiring Slack (user token) authorization."""
@ -114,6 +123,15 @@ class Spotify(OAuth2):
super().__init__(id=id, scopes=scopes)
class Twitch(OAuth2):
"""Marks a tool as requiring Twitch authorization."""
provider_id: str = "twitch"
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
super().__init__(id=id, scopes=scopes)
class X(OAuth2):
"""Marks a tool as requiring X (Twitter) authorization."""

View file

@ -7,9 +7,11 @@ from arcade.core.auth import (
LinkedIn,
Notion,
OAuth2,
Reddit,
Slack,
Spotify,
ToolAuthorization,
Twitch,
X,
Zoom,
)
@ -23,9 +25,11 @@ __all__ = [
"LinkedIn",
"Notion",
"OAuth2",
"Reddit",
"Slack",
"Spotify",
"ToolAuthorization",
"Twitch",
"X",
"Zoom",
]