Add Notion Auth Provider (#277)
<img width="409" alt="Screenshot 2025-03-06 at 11 01 24 AM" src="https://github.com/user-attachments/assets/27cb160e-c8cc-4107-a455-aa1ee9b392c4" />
This commit is contained in:
parent
3638038ddf
commit
fb69e9ef77
2 changed files with 32 additions and 21 deletions
|
|
@ -60,24 +60,6 @@ class Dropbox(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class Google(OAuth2):
|
|
||||||
"""Marks a tool as requiring Google authorization."""
|
|
||||||
|
|
||||||
provider_id: str = "google"
|
|
||||||
|
|
||||||
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."""
|
|
||||||
|
|
||||||
provider_id: str = "slack"
|
|
||||||
|
|
||||||
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
|
||||||
super().__init__(id=id, scopes=scopes)
|
|
||||||
|
|
||||||
|
|
||||||
class GitHub(OAuth2):
|
class GitHub(OAuth2):
|
||||||
"""Marks a tool as requiring GitHub App authorization."""
|
"""Marks a tool as requiring GitHub App authorization."""
|
||||||
|
|
||||||
|
|
@ -87,10 +69,10 @@ class GitHub(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class X(OAuth2):
|
class Google(OAuth2):
|
||||||
"""Marks a tool as requiring X (Twitter) authorization."""
|
"""Marks a tool as requiring Google authorization."""
|
||||||
|
|
||||||
provider_id: str = "x"
|
provider_id: str = "google"
|
||||||
|
|
||||||
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
@ -105,6 +87,24 @@ class LinkedIn(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
|
class Notion(OAuth2):
|
||||||
|
"""Marks a tool as requiring Notion authorization."""
|
||||||
|
|
||||||
|
provider_id: str = "notion"
|
||||||
|
|
||||||
|
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."""
|
||||||
|
|
||||||
|
provider_id: str = "slack"
|
||||||
|
|
||||||
|
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
||||||
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class Spotify(OAuth2):
|
class Spotify(OAuth2):
|
||||||
"""Marks a tool as requiring Spotify authorization."""
|
"""Marks a tool as requiring Spotify authorization."""
|
||||||
|
|
||||||
|
|
@ -114,6 +114,15 @@ class Spotify(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
|
class X(OAuth2):
|
||||||
|
"""Marks a tool as requiring X (Twitter) authorization."""
|
||||||
|
|
||||||
|
provider_id: str = "x"
|
||||||
|
|
||||||
|
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
||||||
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class Zoom(OAuth2):
|
class Zoom(OAuth2):
|
||||||
"""Marks a tool as requiring Zoom authorization."""
|
"""Marks a tool as requiring Zoom authorization."""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ from arcade.core.auth import (
|
||||||
GitHub,
|
GitHub,
|
||||||
Google,
|
Google,
|
||||||
LinkedIn,
|
LinkedIn,
|
||||||
|
Notion,
|
||||||
OAuth2,
|
OAuth2,
|
||||||
Slack,
|
Slack,
|
||||||
Spotify,
|
Spotify,
|
||||||
|
|
@ -20,6 +21,7 @@ __all__ = [
|
||||||
"GitHub",
|
"GitHub",
|
||||||
"Google",
|
"Google",
|
||||||
"LinkedIn",
|
"LinkedIn",
|
||||||
|
"Notion",
|
||||||
"OAuth2",
|
"OAuth2",
|
||||||
"Slack",
|
"Slack",
|
||||||
"Spotify",
|
"Spotify",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue