Skip to content

Commit

Permalink
Support Discord as an Auth provider (#161)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
wdawson authored Nov 22, 2024
1 parent 6ca856b commit 466ea93
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This connects to the Arcade Cloud Engine (`api.arcade-ai.com`) with all pre-buil

For example, try:

```
```text
User ([email protected]):
> star the ArcadeAI/arcade-ai repo on Github
```
Expand All @@ -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!
```
Expand Down
6 changes: 6 additions & 0 deletions arcade/arcade/core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
2 changes: 2 additions & 0 deletions arcade/arcade/sdk/auth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from arcade.core.auth import (
Discord,
GitHub,
Google,
LinkedIn,
Expand All @@ -11,6 +12,7 @@
)

__all__ = [
"Discord",
"GitHub",
"Google",
"LinkedIn",
Expand Down

0 comments on commit 466ea93

Please sign in to comment.