feat: add support for connected accounts#18
Conversation
|
|
||
| ```bash | ||
| $ ANALYZE=true bun run build | ||
| $ ANALYZE=true npm run build |
There was a problem hiding this comment.
non-blocking: we could remove all bun instructions if we are not using bun anymore https://github.com/auth0-samples/auth0-assistant0/pull/18/files#diff-22629912537b3de4818a8a89789cb4eaa8fe06dfcef74c6041530d9eff46246aR41-R54
|
|
||
| const tools = { | ||
| serpApiTool, | ||
| ...(serpApiTool ? { serpApiTool } : {}), |
| - To start with the examples, you'll just need to add your OpenAI API key and Auth0 credentials for the Web app. | ||
| - You can setup a new Auth0 tenant with an Auth0 Web App and Token Vault following the Prerequisites instructions [here](https://auth0.com/ai/docs/call-others-apis-on-users-behalf). | ||
| - You can set up a new Auth0 tenant with an Auth0 Web App and Token Vault following the Prerequisites instructions [here](https://auth0.com/ai/docs/get-started/call-others-apis-on-users-behalf). | ||
| - An Auth0 FGA account, you can create one [here](https://dashboard.fga.dev). Add the FGA store ID, client ID, client secret, and API URL to the `.env` file. |
There was a problem hiding this comment.
With this py-langchain example, on the backend it seems like we will need the equivalent of:
export const auth0 = new Auth0Client({
enableConnectAccountEndpoint: true,
});
updated in the python sdk?
Also, seems we could likely also include the openid scope within:
https://github.com/auth0-samples/auth0-assistant0/blob/main/py-langchain/backend/app/core/auth0_ai.py#L17-L20
yes? (leaving as a reminder for later if this is the case)
There was a problem hiding this comment.
yes, we'll need this change: auth0/auth0-fastapi#67
And this one: auth0/auth0-ai-python#55
|
|
||
| - To start with the examples, you'll just need to add your OpenAI API key and Auth0 credentials for the Web app and Machine to Machine App. | ||
| - You can setup a new Auth0 tenant with an Auth0 Web App and Token Vault following the Prerequisites instructions [here](https://auth0.com/ai/docs/call-others-apis-on-users-behalf). | ||
| - You can set up a new Auth0 tenant with an Auth0 Web App and Token Vault following the Prerequisites instructions [here](https://auth0.com/ai/docs/get-started/call-others-apis-on-users-behalf). |
There was a problem hiding this comment.
(non-blocking): now wondering if we want to include all the Connected Account pre-req's in these READMEs, or just maintain in a singular place and link them in somehow?
There was a problem hiding this comment.
for now, kept the status-quo. But 💯 as discussed this morning, there might be an opportunity to revise layout of READMEs and whether some redundancy is warranted with the docs site (or not).
|
tested ts-langchain, ts-llamaindex, and ts-vercel-ai examples to all work today, using step-up auth flow w/ My Accounts API changes introduced here, alongside the next.js auth0 sdk updates here (introduced locally w/ pnpm tgz packages). ✅ |
0cd554a to
ef09c19
Compare
ef09c19 to
428b094
Compare
This PR introduces and showcases the connected accounts flow implementation by updating Auth0 SDK packages to their latest versions, fixing SPA example implementations, correcting documentation links throughout the codebase, and adding utility scripts for package management.
Note: This PR builds upon the connected accounts feature from the upstream PR
Key Changes
@auth0/ai:^5.0.1→^5.1.1@auth0/ai-langchain:^4.0.0→^4.1.0@auth0/nextjs-auth0:4.8.0→^4.13.0@langchain/langgraph-sdk:^0.0.107→^0.0.109auth0:4.33.0→4.35.0(transient)TokenVaultInterruptHandler.tsxas standalone componentTokenVaultAuthProps.tsx,popup.tsx, andredirect.tsxfrom feat: add support for connected accounts auth0/auth0-ai-js#291, to handle new connected accounts flowscripts/update_packages.shfor automated package version management🐛 Bug Fixes
ts-vercel-ai/src/lib/tools/serpapi.ts: Only include tool when API key is availablets-llamaindex/src/lib/tools/serpapi.ts: Only include tool when API key is available@llamaindex/coreby downgrading openai library versionbunreference ints-langchain/README.md"openid"scope ints-llamaindex/src/lib/tools/gmail.tsandts-vercel-ai/src/lib/tools/gmail.ts"openid"scope ints-llamaindex/src/lib/tools/google-calender.tsandts-vercel-ai/src/lib/tools/google-calender.ts🛠️ Utility Scripts
scripts/update_packages.sh: Automated script for batch updating Auth0 packages across all examples📁 Examples Updated
Python Examples
TypeScript/Next.js Examples
All examples updated with:
🧪 Testing
Manual Testing Required
- Test popup mode for account connection in all Next.js examples
- Test redirect mode for account connection
- Verify Token Vault token exchange works correctly
- Confirm connected account tokens are properly managed
- Verify all examples build successfully (
npm run build)- Test that applications start without errors (
npm run dev)- Confirm no dependency conflicts or warnings
- Test examples work without SerpAPI key (ts-vercel-ai, ts-llamaindex)
- Verify tools are properly included/excluded based on API key availability
- Click through all README documentation URLs
- Verify links resolve to correct documentation pages
- Test Gmail tool integration (if configured)
- Test Google Calendar tool integration (if configured)