Skip to content

Commit e7f1faa

Browse files
authored
Replace user ID in examples with Arcade account email (if logged in) (#342)
* Get account email from Ory session * Update all sample email addresses to placeholder * If no Ory session, fall back to cookie * Cleanup
1 parent 08fc524 commit e7f1faa

File tree

480 files changed

+781
-501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+781
-501
lines changed

examples/code/guides/agentauth/auth_with_google.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import { google } from "googleapis";
1313

1414
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
1515

16-
// Your app's internal ID for the user (an email, UUID, etc). It's used internally to identify your user in Arcade, not to identify with the Gmail service.
17-
const user_id = "[email protected]";
16+
// Your app's internal ID for the user (an email, UUID, etc).
17+
// It's used internally to identify your user in Arcade, not to identify with the Gmail service.
18+
// Use your Arcade account email for testing:
19+
const user_id = "{arcade_user_id}";
1820

1921
// Start the authorization process
2022
let auth_response = await client.auth.start(user_id, "google", {

examples/code/guides/agentauth/auth_with_google.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616

1717
# This would be your app's internal ID for the user (an email, UUID, etc.)
18-
user_id = "[email protected]"
18+
user_id = "{arcade_user_id}"
1919

2020
# Start the authorization process
2121
auth_response = client.auth.start(

examples/code/home/crewai/custom_auth_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from crewai.llm import LLM
55
from crewai_arcade import ArcadeToolManager
66

7-
USER_ID = "[email protected]"
7+
USER_ID = "{arcade_user_id}"
88

99
def custom_auth_flow(
1010
manager: ArcadeToolManager, tool_name: str, **tool_input: dict[str, Any]

examples/code/home/crewai/custom_auth_flow_callback_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from crewai_arcade import ArcadeToolManager
44

5-
USER_ID = "[email protected]"
5+
USER_ID = "{arcade_user_id}"
66

77
def custom_auth_flow(
88
manager: ArcadeToolManager, tool_name: str, **tool_input: dict[str, Any]

examples/code/home/crewai/use_arcade_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from crewai.llm import LLM
33
from crewai_arcade import ArcadeToolManager
44

5-
manager = ArcadeToolManager(default_user_id="[email protected]")
5+
manager = ArcadeToolManager(default_user_id="{arcade_user_id}")
66

77
tools = manager.get_tools(tools=["Google.ListEmails"])
88

examples/code/home/mcp/streamable-http/typescript-client.ts.fake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99

1010
// Replace with your actual API key and user ID
1111
const arcadeApiKey = "your_arcade_api_key";
12-
const userId = "[email protected]";
12+
const userId = "{arcade_user_id}";
1313
const arcadeURL = "https://api.arcade.dev/v1";
1414
const serverURL = `${arcadeURL}/mcp`;
1515

examples/code/home/use-tools/call-tools-directly/github_directly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Arcade from "@arcadeai/arcadejs";
22

33
const client = new Arcade();
44

5-
let userId = "[email protected]";
5+
let userId = "{arcade_user_id}";
66

77
const response = await client.tools.execute({
88
tool_name: "GitHub.SetStarred",

examples/code/home/use-tools/call-tools-directly/github_directly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
client = Arcade()
44

5-
user_id = "[email protected]"
5+
user_id = "{arcade_user_id}"
66

77
response = client.tools.execute(
88
tool_name="GitHub.SetStarred",

examples/code/home/use-tools/call-tools-directly/quickstart.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import Arcade from "@arcadeai/arcadejs";
22

33
// You can also set the `ARCADE_API_KEY` environment variable instead of passing it as a parameter.
44
const client = new Arcade({
5-
apiKey: "arcade_api_key",
5+
apiKey: "{arcade_api_key}",
66
});
77

88
// Arcade needs a unique identifier for your application user (this could be an email address, a UUID, etc).
9-
// In this example, simply use your email address as the user ID:
10-
let userId = "[email protected]";
9+
// In this example, use the email you used to sign up for Arcade.dev:
10+
let userId = "{arcade_user_id}";
1111

1212
// Let's use the `Math.Sqrt` tool from the Arcade Math toolkit to get the square root of a number.
1313
const response_sqrt = await client.tools.execute({

examples/code/home/use-tools/call-tools-directly/quickstart.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from arcadepy import Arcade
22

33
# You can also set the `ARCADE_API_KEY` environment variable instead of passing it as a parameter.
4-
client = Arcade(api_key="arcade_api_key")
4+
client = Arcade(api_key="{arcade_api_key}")
55

66
# Arcade needs a unique identifier for your application user (this could be an email address, a UUID, etc).
7-
# In this example, simply use your email address as the user ID:
8-
user_id = "[email protected]"
7+
# In this example, use the email you used to sign up for Arcade.dev:
8+
user_id = "{arcade_user_id}"
99

1010
# Let's use the `Math.Sqrt` tool from the Arcade Math toolkit to get the square root of a number.
1111
response = client.tools.execute(

0 commit comments

Comments
 (0)