Skip to content

Conversation

@pmalouin
Copy link
Contributor

@pmalouin pmalouin commented Nov 7, 2025

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:

  • Package Version Updates: Bumped all Auth0 packages to latest versions supporting connected accounts:
    • @auth0/ai: ^5.0.1^5.1.1
    • @auth0/ai-langchain: ^4.0.0^4.1.0
    • @auth0/ai-vercel: ^4.0.1^4.1.0
    • @auth0/nextjs-auth0: ^4.10.0^4.13.0
    • @auth0/auth0-spa-js: ^2.6.0^2.9.0
  • SPA Examples: Implemented the connected accounts flow in SPA examples:
  • Documentation Updates: Fixed incorrect documentation URLs across all examples:
    • Updated links from https://auth0.com/ai/docs/... to https://auth0.com/ai/docs/get-started/...
    • Fixed references in READMEs for authenticate-users, call-apis-on-users-behalf, authorization-for-rag, and asynchronous-authorization examples
    • Updated AUTH0_INTEGRATION.md with code updates and up-to-date instructions
  • Component Refactoring: Reorganized Token Vault components for better maintainability:
  • Utility Scripts: Added scripts/update_packages.sh for automated package version management
  • Next.js Example Updates: Applied configuration changes to Next.js examples:
    • Updated auth initialization in langchain-next-js and vercel-ai-next-js
    • Modified route handlers to support connect account endpoint
    • Updated environment variable documentation

Examples Updated:

Asynchronous Authorization:

  • langchain-fastapi-py
  • langchain-next-js
  • vercel-ai-next-js
  • vercel-ai-node-js

Authenticate Users:

  • langchain-fastapi-py and langchain-fastapi-py-starter
  • langchain-next-js
  • vercel-ai-next-js and vercel-ai-next-js-starter

Authorization for RAG:

  • All framework variants (langchain, langgraph, llamaindex, openai-fga, vercel-ai)

Call APIs on Users Behalf:

  • others-api/langchain-fastapi-py
  • others-api/langchain-next-js
  • others-api/langchain-react-spa-js ⭐ (major fixes)
  • others-api/vercel-ai-next-js
  • others-api/vercel-react-spa-js ⭐ (major fixes)
  • your-api/* examples

Testing

Manual Testing Required:

  • SPA Examples: Verify both langchain-react-spa-js and vercel-react-spa-js work correctly:
    • Test connected accounts flow in popup mode
    • Verify Token Vault token exchange works
    • Confirm My Account API integration functions properly
    • Test MRRT and DPoP functionality
  • Next.js Examples: Verify no regressions in Next.js examples:
    • Test the authz flow via connected accounts
    • Verify existing functionality remains intact
  • Documentation Links: Verify all updated documentation URLs resolve correctly:
    • Click through README links to ensure they point to correct documentation pages
  • Package Updates: Confirm all examples build and run successfully:
    • Test that applications start without errors

Notes

  • The package version script (scripts/update_packages.sh) can be used for future batch updates
  • All examples have been updated to use consistent package versions

@pmalouin pmalouin changed the title feat: add support for connected accounts feat: add support for connected accounts feat: add support for connected accounts Nov 7, 2025
@priley86
Copy link
Contributor

This appears ready for merge after @auth0/auth0-spa-js and @auth0/nextjs-auth0 packages have been published and reflected here. ✔️

@pmalouin pmalouin marked this pull request as ready for review November 17, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants