Support Discord as an Auth provider (#161)

This supports Discord as an auth provider. It depends on the next
release of the Arcade Engine to work, so ~we'll hold off on merging for
now.~ we'll do it live!
This commit is contained in:
Wils Dawson 2024-11-22 15:43:44 -08:00 committed by GitHub
parent 6ca856bd4f
commit 466ea933cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View file

@ -87,7 +87,7 @@ This connects to the Arcade Cloud Engine (`api.arcade-ai.com`) with all pre-buil
For example, try:
```
```text
User (dev@arcade-ai.com):
> star the ArcadeAI/arcade-ai repo on Github
```
@ -96,7 +96,7 @@ Arcade AI will prompt you to authorize with GitHub and will star the [ArcadeAI/a
You'll see:
```
```text
Assistant (gpt-4o):
I starred the ArcadeAI/arcade-ai repo on Github for you!
```

View file

@ -29,6 +29,12 @@ class OAuth2(ToolAuthorization):
"""The scope(s) needed for the authorized action."""
class Discord(OAuth2):
"""Marks a tool as requiring Discord authorization."""
provider_id: str = "discord"
class Google(OAuth2):
"""Marks a tool as requiring Google authorization."""

View file

@ -1,4 +1,5 @@
from arcade.core.auth import (
Discord,
GitHub,
Google,
LinkedIn,
@ -11,6 +12,7 @@ from arcade.core.auth import (
)
__all__ = [
"Discord",
"GitHub",
"Google",
"LinkedIn",