diff --git a/auth4genai/.vale.ini b/auth4genai/.vale.ini index 13ba51262..d505bde39 100644 --- a/auth4genai/.vale.ini +++ b/auth4genai/.vale.ini @@ -1,10 +1,122 @@ +; Vale configuration for Mintlify docs. +; Mintlify CI will pick this up if enabled: +; https://www.mintlify.com/docs/deploy/ci +; +; Keep this file under version control and evolve it with the docs: +; https://www.mintlify.com/guides/maintenance +; +; Vale config reference: +; https://vale.sh/docs +; +; MDX support: +; - Vale 3.13+ treats .mdx as a first class format. +; - MDX parsing is handled by the external mdx2vast CLI, which must be +; installed and available on $PATH: +; npm install -g mdx2vast +; +; When Vale flags something that is actually OK: +; - If it is project-wide (for example a product name), add it to: +; .vale/styles/config/ignore/authdocs.txt +; - If it is a systematic branding issue, add a swap to: +; .vale/styles/AuthDocs/Brands.yml +; - Only use {/* vale off */} / {/* vale on */} for +; narrow, one-off cases (quotes, unusual examples). + +StylesPath = .vale/styles + +; Only report error-level issues. Suggestions and warnings are suppressed +; entirely so devs are not blocked on minor style nits. MinAlertLevel = error -[formats] -mdx = md +; Scopes to ignore completely. These are either: +; - Already covered by other tooling, or +; - Places where language checks are too noisy or fragile +; (inline code, URLs, links, images). +; Note: 'code' is handled by SkippedScopes below for block-level code. +IgnoredScopes = tt, img, url, a + +; Skip entire blocks that are not prose. This keeps Vale out of +; style/script tags,
blocks, code fences, and figures.
+SkippedScopes = script, style, pre, figure, code
+
+; Optional checks developers may enable locally:
+; vale.Annotations = YES
[*.mdx]
-BasedOnStyles = Vale
-Vale.Terms = NO
+; Base on Vale's core rules plus our custom AuthDocs style:
+; https://vale.sh/docs/getting-started/configuration/#basedonstyles
+BasedOnStyles = Vale, AuthDocs
+
+; Keep helpful core rules for terminology consistency and
+; repeated word detection across the docs.
+Vale.Terms = YES
+Vale.Repetition = YES
+
+; Replace the built-in spelling rule with a custom one that knows about our
+; domain-specific vocabulary:
+; https://vale.sh/docs/checks/spelling
+; Turning Vale.Spelling off here avoids double reporting issues that our
+; AuthDocs.Spelling rule already handles with an ignore list.
Vale.Spelling = NO
-Vale.Repetition = NO
+AuthDocs.Spelling = YES
+
+; Substitution rule for brand capitalization and common typos:
+; https://vale.sh/docs/checks/substitution
+; Keep this focused so that automated fixes remain predictable.
+AuthDocs.Brands = YES
+
+[*.md]
+; Apply the same style stack to plain Markdown files so behavior
+; is consistent across .md and .mdx content.
+BasedOnStyles = Vale, AuthDocs
+
+; Keep behavior consistent with MDX files.
+Vale.Terms = YES
+Vale.Repetition = YES
+
+; Use the same custom spelling + brand rules as MDX.
+Vale.Spelling = NO
+AuthDocs.Spelling = YES
+AuthDocs.Brands = YES
+
+; Snippets and code-heavy examples: disable brand rules.
+; These files are mostly inline code and copied examples where
+; strict brand enforcement would generate a lot of noise.
+[snippets/**/*.mdx]
+AuthDocs.Brands = NO
+
+; Component demo content: disable spelling and brand rules.
+; This page is primarily example copy used to exercise UI components,
+; not user-facing documentation.
+[components.mdx]
+AuthDocs.Brands = NO
+AuthDocs.Spelling = NO
+
+; Sample app index pages: disable brands.
+; Mostly links, titles, and names where strict enforcement over-triggers.
+[mcp/sample-apps.mdx]
+AuthDocs.Brands = NO
+
+[sample-apps.mdx]
+AuthDocs.Brands = NO
+
+; GitHub integration page: disable brands.
+; Contains github in URLs and domain-like strings where strict brand
+; correction would generate noise.
+[integrations/github.mdx]
+AuthDocs.Brands = NO
+
+; GitHub how-to snippet files: disable brands.
+; Contain lowercase github in text and URLs.
+[snippets/how-tos/github/**/*.mdx]
+AuthDocs.Brands = NO
+
+; SDK documentation pages: disable brands.
+; Contain GitHub sample repository URLs.
+[sdks/**/*.mdx]
+AuthDocs.Brands = NO
+
+; Overview and hub pages: disable brands.
+; Mostly cards and links that aggregate other content.
+[how-tos/overview.mdx]
+AuthDocs.Brands = NO
diff --git a/auth4genai/.vale/README.md b/auth4genai/.vale/README.md
new file mode 100644
index 000000000..41fd90e74
--- /dev/null
+++ b/auth4genai/.vale/README.md
@@ -0,0 +1,164 @@
+# Vale Linting
+
+This directory contains the Vale configuration used to lint and standardize the documentation in `auth4genai`. Vale helps ensure consistent terminology, brand usage, spelling, and overall prose quality.
+
+## Requirements
+
+To run Vale with MDX support, you must have:
+
+- **Vale 3.13.0 or newer**
+- **mdx2vast 0.3.0 or newer**
+- Node.js and npm installed
+- Both `vale` and `mdx2vast` available on your `$PATH`
+
+## Installation
+
+Vale must be installed locally before running checks. MDX support additionally requires the external parser `mdx2vast`.
+
+Install Vale ([docs](https://vale.sh/docs/install)):
+
+```bash
+brew install vale
+```
+
+Install the MDX parser ([MDX format docs](https://vale.sh/docs/formats/mdx)):
+
+```bash
+npm install -g mdx2vast
+```
+
+Both executables must be available in your `$PATH`.
+
+Run Vale from the `auth4genai` directory:
+
+```bash
+vale .
+```
+
+A clean run should report zero errors. If you see unexpected output, refer to the [MDX behavior notes](https://vale.sh/docs/formats/mdx#behaviors) for details on what Vale ignores by default.
+
+## How MDX content is interpreted
+
+> **Important:** MDX files do *not* support HTML comments (``).
+> Always use MDX comment syntax instead:
+>
+> ```mdx
+> {/* vale off */}
+> ...ignored content...
+> {/* vale on */}
+> ```
+
+Vale parses `.mdx` files using `mdx2vast`. The parser automatically ignores:
+
+* `import` and `export` statements
+* JSX components and JSX blocks
+* fenced code blocks
+* inline backtick code
+* URLs (see [URL handling](https://vale.sh/docs/topics/urls))
+* single-line `{ ... }` JavaScript expressions
+
+These defaults help avoid false positives in pages that combine prose with examples, components, and structured metadata.
+
+Inline MDX-aware controls are supported when necessary. MDX files use curly-brace comment syntax (not HTML comments):
+
+```mdx
+{/* vale off */} …ignored… {/* vale on */}
+{/* vale Style.RuleName = NO */}
+{/* vale Style.RuleName["match"] = NO */}
+```
+
+For example, to disable the custom spelling rule for a specific word that would normally be flagged:
+
+```mdx
+{/* vale AuthDocs.Spelling["ocurrance"] = NO */}
+This misspelling is intentional in this context and should be skipped.
+{/* vale AuthDocs.Spelling["ocurrance"] = YES */}
+```
+
+**Note:** These are MDX-style comments. HTML comments (``) will not work in `.mdx` files.
+
+Guidance on these controls:
+[https://vale.sh/docs/topics/config/#comment-based-controls](https://vale.sh/docs/topics/config/#comment-based-controls)
+
+## Configuration structure
+
+All configuration begins with a single file: `.vale.ini`. That file loads a custom style bundle located under `.vale/styles`.
+
+### `.vale.ini`
+
+* Configures MDX and Markdown behavior using a shared style stack
+* Enables project-specific rules via `AuthDocs`
+* Sets global defaults such as `MinAlertLevel = error` (only error-level issues are reported; suggestions and warnings are suppressed)
+* Applies overrides for snippet directories, component demos, and sample-app index pages
+* Contains path-based exceptions for content where strict linting generates false positives
+
+See the Vale config reference:
+[https://vale.sh/docs/topics/config](https://vale.sh/docs/topics/config)
+
+### `.vale/styles/AuthDocs/Spelling.yml`
+
+Defines a custom spelling rule that replaces Vale’s default spellchecker.
+This rule:
+
+* Uses project-specific ignore lists
+* Reduces noise from acronyms, product names, config keys, or identifiers
+* Helps catch real typos while avoiding false positives
+
+Vale spelling check reference:
+[https://vale.sh/docs/checks/spelling](https://vale.sh/docs/checks/spelling)
+
+The ignore list it relies on lives at:
+
+```
+.vale/styles/config/ignore/authdocs.txt
+```
+
+### `.vale/styles/config/ignore/authdocs.txt`
+
+Contains domain-specific vocabulary:
+
+* Product names
+* Framework and platform names
+* Identifiers and config keys
+* Project jargon
+* Terms we expect to appear in code or prose without being flagged
+
+See the “ignore files” section of the spelling check docs:
+[https://vale.sh/docs/checks/spelling/#ignore-files](https://vale.sh/docs/checks/spelling/#ignore-files)
+
+This file should be kept up to date as terminology evolves. Mintlify’s maintenance guidance is helpful here:
+[https://www.mintlify.com/guides/maintenance](https://www.mintlify.com/guides/maintenance)
+
+### `.vale/styles/AuthDocs/Brands.yml`
+
+Contains substitution rules for:
+
+* brand capitalization (for example, `github` → `GitHub`, `javascript` → `JavaScript`)
+* recurring misspellings
+* invalid plurals (for example, `SDK's` → `SDKs`)
+
+Vale substitution check reference:
+[https://vale.sh/docs/checks/substitution](https://vale.sh/docs/checks/substitution)
+
+Only systematic, project-wide corrections should be added.
+
+**Note:** If a file generates repeated false positives from brand checks (for example, GitHub URLs on an integration page), the preferred approach is to disable `AuthDocs.Brands` for that path in `.vale.ini` rather than adding exceptions to the rule. See the "MDX and Markdown overrides in `.vale.ini`" section below.
+
+### MDX and Markdown overrides in `.vale.ini`
+
+Certain paths contain examples, generated text, or content where strict rules generate noise. In these paths we disable or relax specific rules:
+
+* `snippets/**/*.mdx` – brand checks disabled
+* `components.mdx` – brand and spelling checks disabled
+* `sample-apps.mdx` and `mcp/sample-apps.mdx` – brand checks disabled
+* overview or card-heavy pages (`how-tos/overview.mdx`) – brand checks disabled
+
+These overrides help keep CI output stable without disabling important linting elsewhere.
+
+## Helpful references
+
+* Vale documentation: [https://vale.sh/docs](https://vale.sh/docs)
+* MDX parser (`mdx2vast`): [https://github.com/errata-ai/MDX](https://github.com/errata-ai/MDX)
+* Mintlify CI integration: [https://mintlify.com/docs/deploy/ci](https://mintlify.com/docs/deploy/ci)
+* Mintlify maintenance guidance: [https://mintlify.com/guides/maintenance](https://mintlify.com/guides/maintenance)
+* Mintlify writing style tips: [https://mintlify.com/guides/writing-style-tips](https://mintlify.com/guides/writing-style-tips)
diff --git a/auth4genai/.vale/styles/AuthDocs/Brands.yml b/auth4genai/.vale/styles/AuthDocs/Brands.yml
new file mode 100644
index 000000000..16b2f35d5
--- /dev/null
+++ b/auth4genai/.vale/styles/AuthDocs/Brands.yml
@@ -0,0 +1,34 @@
+# Normalization rules for brand names, pluralization fixes, and recurring typos.
+#
+# Substitution rule reference:
+# https://vale.sh/docs/checks/substitution
+#
+# Guidelines:
+# - Use this file for systematic, project-wide corrections.
+# - Add legitimate domain terms to the ignore list instead:
+# .vale/styles/config/ignore/authdocs.txt
+# - Prefer substitutions here over inline disable blocks.
+# - Avoid adding one-off or file-specific corrections.
+
+extends: substitution
+message: "Consider using '%s' instead of '%s'."
+level: error
+ignorecase: true
+scope: text
+
+swap:
+ # Brand capitalization
+ # Word boundaries match whole words only. This can trigger on substrings
+ # like github in "example.github.io" due to punctuation (. = non-word char).
+ # Disable AuthDocs.Brands in files where this generates false positives.
+ "\\bgithub\\b": GitHub
+ "\\bjavascript\\b": JavaScript
+
+ # Incorrect plurals / possessives
+ "SDK's": SDKs
+ "sdk's": SDKs
+
+ # Recurring typos in this repo
+ commnd: command
+ ocurrs: occurs
+ repositores: repositories
diff --git a/auth4genai/.vale/styles/AuthDocs/Spelling.yml b/auth4genai/.vale/styles/AuthDocs/Spelling.yml
new file mode 100644
index 000000000..cd5d47365
--- /dev/null
+++ b/auth4genai/.vale/styles/AuthDocs/Spelling.yml
@@ -0,0 +1,18 @@
+# Custom spelling rule for this documentation set.
+#
+# Spelling rule reference:
+# https://vale.sh/docs/checks/spelling
+#
+# Purpose:
+# - Catch actual typos while avoiding noise from domain-specific terms.
+# - Accepted terms must be placed in the ignore file:
+# .vale/styles/config/ignore/authdocs.txt
+# - Inline disabling should be rare and only for unusual cases.
+
+extends: spelling
+message: "Did you really mean '%s'?"
+level: error
+scope: text
+
+ignore:
+- config/ignore/authdocs.txt
diff --git a/auth4genai/.vale/styles/config/ignore/authdocs.txt b/auth4genai/.vale/styles/config/ignore/authdocs.txt
new file mode 100644
index 000000000..7e6bae7b0
--- /dev/null
+++ b/auth4genai/.vale/styles/config/ignore/authdocs.txt
@@ -0,0 +1,138 @@
+# Domain-specific terms and product names that should not trigger spelling errors.
+# One entry per line.
+#
+# Vale ignore-file docs:
+# https://vale.sh/docs/checks/spelling/#ignore-files
+#
+# Guidelines:
+# - Add project-wide terms here.
+# - Add systematic misspellings or capitalization fixes to Brands.yml instead.
+# - Use inline disables only for rare one-off cases.
+# - Review periodically:
+# https://www.mintlify.com/guides/maintenance
+
+# Acronyms / technical terms
+api
+API
+APIs
+async
+CLIs
+const
+Ctrl
+dev
+GANs
+IPs
+LLMs
+LSTMs
+npm
+oauth
+OAuth
+OIDC
+RNNs
+SDKs
+URIs
+
+# Auth / project jargon
+agentic
+Agentic
+authorizer
+authorizers
+Auditability
+Backchannel
+chatbot
+chatbots
+fullstack
+hardcoded
+hardcoding
+Langchain
+Langchain's
+Langgraph
+Passwordless
+pretrained
+Quickstarts
+quickstarts
+Todos
+
+# Framework / platform names
+Auth0
+Auth0-AI
+LangGraph
+LangGraphJS
+Mintlify
+Next.js
+Node.js
+OpenAI
+TokenVault
+TokenVaultInterrupt
+VercelAI
+
+# Product / company / library names
+Basecamp
+Bitbucket
+Bitmoji
+DigitalOcean
+Dropbox
+Entra
+Fastify
+Figma
+Fitbit
+Freshbooks
+Genkit
+Hono
+HuggingFace
+Jira
+LlamaIndex
+Okta
+Salesforce
+Slack
+Snapchat
+Spotify
+Strava
+Tumblr
+Twitch
+Twitter
+Vercel
+Vite
+
+# Identifiers and config keys
+AISDKSample
+applicationName
+applicationType
+Async
+authHandler
+authHeader
+callbackUrl
+client_id
+client_secret
+config
+env
+hostname
+HTTPException
+integrationTypes
+jwtVerify
+logoutUrl
+middleware
+namespaces
+node_version
+offline_access
+refresh_token
+tokensets
+user_id
+uv
+
+# UI labels and intentional literals
+_View
+auditable
+Misconfiguration
+misconfiguration
+reblog
+Secret_
+Unvetted
+
+# Repo-specific vocabulary
+openai
+passthrough
+repo
+repo's
+repos
+sdks
diff --git a/auth4genai/README.md b/auth4genai/README.md
index 7126891f1..4209fbfde 100644
--- a/auth4genai/README.md
+++ b/auth4genai/README.md
@@ -30,7 +30,7 @@ mint dev
### Publishing Changes
-Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
+Install our GitHub App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
#### Troubleshooting
@@ -40,7 +40,7 @@ Install our Github App to auto propagate changes from your repo to your deployme
## Custom React Components
-Use the `snippets` folder to hold content we want to reuse throughout the application; for example, custom React components or JSON-style data.
+Use the `snippets` folder to hold content we want to reuse throughout the application; for example, custom React components or JSON-style data.
Note that when importing a component into a `.mdx` file, we must include everything that component imports as well.
For example: `SearchAndFilterGrid` imports `CustomCard`. When importing and using `SearchAndFilterGrid` in `/integrations/overview.mdx` file, we must also import `CustomCard`.
@@ -71,3 +71,7 @@ For example:
...
```
+
+## Vale Linting
+
+We use [Vale](https://vale.sh/) to keep terminology and brand usage consistent across the docs. See the dedicated Vale guide in [`./.vale/README.md`](./.vale/README.md) for details on configuration structure, MDX support, and how to extend or adjust the rules.
diff --git a/auth4genai/components.mdx b/auth4genai/components.mdx
index bae9181d7..d90d2694c 100644
--- a/auth4genai/components.mdx
+++ b/auth4genai/components.mdx
@@ -147,7 +147,7 @@ Auth0 for AI Agents is currently available in Developer Preview. Join today to s
### 1. I am a heading
- I am a bunch of content knkjangk;jadng;ksj dbs;kj bdsjk dgajk bjsa dad gakgdnja k gdjngajknagjkb adkjg akg da
+ I am some example content for testing the card component layout and styling.
```bash
@@ -166,9 +166,9 @@ Auth0 for AI Agents is currently available in Developer Preview. Join today to s
### 3. I am another heading
- Content here sgjkdankjandkv;ank;akj
- akgjdnakjv akjvs alvkalsa;sgankdgnkdasngshghja
- agkajngakjdnjkansfjknafjkn
+ This is some example content for demonstrating
+ the card layout and styling in a
+ two-column configuration.
@@ -200,4 +200,4 @@ Auth0 for AI Agents is currently available in Developer Preview. Join today to s
```
-
\ No newline at end of file
+
diff --git a/auth4genai/get-started/call-your-apis-on-users-behalf.mdx b/auth4genai/get-started/call-your-apis-on-users-behalf.mdx
index d06df0c0e..acf5a010a 100644
--- a/auth4genai/get-started/call-your-apis-on-users-behalf.mdx
+++ b/auth4genai/get-started/call-your-apis-on-users-behalf.mdx
@@ -49,4 +49,4 @@ By the end of this quickstart, you should have an AI application integrated with
- To set up third-party tool calling, complete the
[Call other's APIs on user's behalf](../get-started/call-others-apis-on-users-behalf) quickstart.
- To explore the Auth0 Next.js SDK, see the
- [Github repo](https://github.com/auth0/nextjs-auth0).
+ [GitHub repo](https://github.com/auth0/nextjs-auth0).
diff --git a/auth4genai/how-tos/get-github-issues-python.mdx b/auth4genai/how-tos/get-github-issues-python.mdx
index f97ac43ce..190d8605a 100644
--- a/auth4genai/how-tos/get-github-issues-python.mdx
+++ b/auth4genai/how-tos/get-github-issues-python.mdx
@@ -35,7 +35,7 @@ Follow the rest of the steps here to setup by appending to the same file you hav
## Set up GitHub
-Create a function that will return the access token for Github.
+Create a function that will return the access token for GitHub.
```python wrap lines
async def get_token_from_token_vault():
@@ -47,7 +47,7 @@ async def get_token_from_token_vault():
github_token = asyncio.run(get_token_from_token_vault())
```
-Create a function that calls Github for a given repo using a provided access token
+Create a function that calls GitHub for a given repo using a provided access token
```python wrap lines
def fetch_github_issues(owner, repo, token):
diff --git a/auth4genai/how-tos/list-github-repositories.mdx b/auth4genai/how-tos/list-github-repositories.mdx
index f704e4bd9..3c36fc0c2 100644
--- a/auth4genai/how-tos/list-github-repositories.mdx
+++ b/auth4genai/how-tos/list-github-repositories.mdx
@@ -1,6 +1,6 @@
---
title: List GitHub Repositories
-description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores"
+description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositories"
mode: "wide"
---
@@ -16,7 +16,7 @@ import AccountLinking from "/snippets/how-tos/account-linking.mdx";
import CreateCustomApiClient from "/snippets/common/create-custom-api-client.mdx";
-
+
Before using this example, make sure you:
diff --git a/auth4genai/how-tos/overview.mdx b/auth4genai/how-tos/overview.mdx
index 0b8de5dfa..c9e2a1085 100644
--- a/auth4genai/how-tos/overview.mdx
+++ b/auth4genai/how-tos/overview.mdx
@@ -5,14 +5,14 @@ sidebarTitle: How-Tos
mode: "wide"
---
-## Javascript & Python
+## JavaScript & Python
Learn how to use Auth0 for AI Agents SDKs to check your Google Calendar availability.
- Use OpenAI, NextJS, and the Auth0 SDKs to list your GitHub repositores.
+ Use OpenAI, NextJS, and the Auth0 SDKs to list your GitHub repositories.
Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels.
diff --git a/auth4genai/integrations/github.mdx b/auth4genai/integrations/github.mdx
index d44e9198d..de1431bb6 100644
--- a/auth4genai/integrations/github.mdx
+++ b/auth4genai/integrations/github.mdx
@@ -6,7 +6,7 @@ description: "Connect your AI Agents to GitHub for repository access, issue mana
import FindDomainInfoBlock from "/snippets/common/find-domain-info-block.mdx";
import LearnMore from "/snippets/integrations/learn-more.mdx";
-The GitHub integration allows your AI Agents to authenticate users with their GitHub accounts and access GitHub repositories and manage issues their behalf.
+The GitHub integration allows your AI Agents to authenticate users with their GitHub accounts and access GitHub repositories through GitHub's APIs.
## Overview
@@ -22,7 +22,7 @@ GitHub apps [use fine grained permissions](https://docs.github.com/en/enterprise
-
+
-
Sign up for a [GitHub Developer account](https://github.com/signup)
diff --git a/auth4genai/integrations/google.mdx b/auth4genai/integrations/google.mdx
index 247eec184..2e31278ab 100644
--- a/auth4genai/integrations/google.mdx
+++ b/auth4genai/integrations/google.mdx
@@ -83,7 +83,7 @@ In the Google Cloud Console, [create a new OAuth 2.0 Client](https://console.clo
Enter the following information for your OAuth 2.0 Client:
- **Name**: The name of your OAuth 2.0 Client.
- - **Authorized Javascript origins**: `https://{YOUR_AUTH0_DOMAIN}`
+ - **Authorized JavaScript origins**: `https://{YOUR_AUTH0_DOMAIN}`
-
**Authorized redirect URIs**: `https://{YOUR_AUTH0_DOMAIN}/login/callback`
diff --git a/auth4genai/snippets/get-started/vercel-ai-react-spa-js/call-others-api.mdx b/auth4genai/snippets/get-started/vercel-ai-react-spa-js/call-others-api.mdx
index 06869cf17..aa42f0a87 100644
--- a/auth4genai/snippets/get-started/vercel-ai-react-spa-js/call-others-api.mdx
+++ b/auth4genai/snippets/get-started/vercel-ai-react-spa-js/call-others-api.mdx
@@ -85,7 +85,7 @@ PORT=3001
### Configure the SPA for step-up authorization
-Unlike the Next.js example, which uses refresh tokens, this React SPA approach uses **access tokens** for token exchange with Token Vault. The SPA handles step-up authorization using Auth0 SPA SDK's `loginWithPopup()` method to display the consent screen and allow the user to grant additional permissions.
+Unlike the Next.js example, which uses refresh tokens, this React SPA approach uses **access tokens** for token exchange with Token Vault. The SPA handles step-up authorization using the `loginWithPopup()` method from the Auth0 SPA SDK to display the consent screen and allow the user to grant additional permissions.
Create `client/src/components/TokenVaultConsentPopup.tsx`:
@@ -283,7 +283,7 @@ export const createGoogleCalendarTool = (c: Context): ToolWrapper => {
Create an AI-powered chat server using Hono, the Auth0 AI SDK, and the Vercel AI SDK that allows a user to chat with an AI assistant that can access their Google Calendar.
-The Auth0 AI SDK's `withInterruptions()` function wraps the Vercel AI SDK's `streamText()` function, enabling the Hono server to handle interrupts, which are special responses from Token Vault. An interrupt is sent if a tool call requires a new or updated access token, for example, if a user needs to re-authenticate or a new permission is needed.
+The `withInterruptions()` function in the Auth0 AI SDK wraps the Vercel AI SDK `streamText()` function, enabling the Hono server to handle interrupts, which are special responses from Token Vault. An interrupt is sent if a tool call requires a new or updated access token, for example, if a user needs to re-authenticate or a new permission is needed.
Create `server/src/index.ts`:
diff --git a/auth4genai/snippets/how-tos/github/cloudflare-agents.mdx b/auth4genai/snippets/how-tos/github/cloudflare-agents.mdx
index 9ca0f441b..c5b6f3dcc 100644
--- a/auth4genai/snippets/how-tos/github/cloudflare-agents.mdx
+++ b/auth4genai/snippets/how-tos/github/cloudflare-agents.mdx
@@ -17,7 +17,7 @@ Then, you need to install the Auth0 AI SDK for Cloudflare Agents:
npm install @auth0/ai-vercel @auth0/ai-cloudflare @auth0/ai
```
-Then, you need to initialize Auth0 AI and set up the connection to request access tokens with the required Github scopes.
+Then, you need to initialize Auth0 AI and set up the connection to request access tokens with the required GitHub scopes.
```typescript ./src/lib/auth0-ai.ts wrap lines
import { Auth0AI, setGlobalAIContext } from "@auth0/ai-vercel";
@@ -46,9 +46,9 @@ export const withGitHub = auth0AI.withTokenVault({
});
```
-### 2. Integrate your tool with the Github API
+### 2. Integrate your tool with the GitHub API
-Wrap your tool using the Auth0 AI SDK to obtain an access token for the Github API.
+Wrap your tool using the Auth0 AI SDK to obtain an access token for the GitHub API.
```typescript ./src/agent/tools/listRepositories.ts wrap lines highlight={2-4,9,15,19-21,31-33}
import { Octokit, RequestError } from "octokit";
@@ -225,7 +225,7 @@ export default function Chat() {