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:
parent
6ca856bd4f
commit
466ea933cd
3 changed files with 10 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ This connects to the Arcade Cloud Engine (`api.arcade-ai.com`) with all pre-buil
|
||||||
|
|
||||||
For example, try:
|
For example, try:
|
||||||
|
|
||||||
```
|
```text
|
||||||
User (dev@arcade-ai.com):
|
User (dev@arcade-ai.com):
|
||||||
> star the ArcadeAI/arcade-ai repo on Github
|
> 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:
|
You'll see:
|
||||||
|
|
||||||
```
|
```text
|
||||||
Assistant (gpt-4o):
|
Assistant (gpt-4o):
|
||||||
I starred the ArcadeAI/arcade-ai repo on Github for you!
|
I starred the ArcadeAI/arcade-ai repo on Github for you!
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ class OAuth2(ToolAuthorization):
|
||||||
"""The scope(s) needed for the authorized action."""
|
"""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):
|
class Google(OAuth2):
|
||||||
"""Marks a tool as requiring Google authorization."""
|
"""Marks a tool as requiring Google authorization."""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
from arcade.core.auth import (
|
from arcade.core.auth import (
|
||||||
|
Discord,
|
||||||
GitHub,
|
GitHub,
|
||||||
Google,
|
Google,
|
||||||
LinkedIn,
|
LinkedIn,
|
||||||
|
|
@ -11,6 +12,7 @@ from arcade.core.auth import (
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
"Discord",
|
||||||
"GitHub",
|
"GitHub",
|
||||||
"Google",
|
"Google",
|
||||||
"LinkedIn",
|
"LinkedIn",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue