feat: Add Reddit and Twitch named providers (#294)
Adding auth support for future Reddit and Twitch tools.
This commit is contained in:
parent
f04087b389
commit
ef5b19b4a2
2 changed files with 22 additions and 0 deletions
|
|
@ -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."""
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue