Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Auth0 for AI Agents
Search
Deepu K Sasidharan
September 24, 2025
Programming
1
75
Auth0 for AI Agents
How to use OAuth to access third party services from an AI agent
by Deepu K Sasidharan
Deepu K Sasidharan
September 24, 2025
Tweet
Share
More Decks by Deepu K Sasidharan
See All by Deepu K Sasidharan
Delay the AI Overlords: How OAuth and OpenFGA Can Keep Your AI Agents from Going Rogue
deepu105
0
24
Delay the AI Overlords: How OAuth and OpenFGA Can Keep Your AI Agents from Going Rogue
deepu105
0
30
Auth for MCP: Secure MCP servers using OAuth
deepu105
0
27
Securing the Future of AI: Authorization Strategies for RAG Systems using LangChain4J and OpenFGA
deepu105
0
97
Demystifying OAuth and OIDC: JFokus
deepu105
1
150
Mastering Kubernetes Security from Containers to Cluster Fortresses
deepu105
1
93
Go containerless on Kubernetes
deepu105
1
130
A Passwordless Future! Passkeys for Java Developers
deepu105
0
180
Go containerless on Kubernetes with WebAssembly and Rust
deepu105
0
73
Other Decks in Programming
See All in Programming
ゲームの物理 剛体編
fadis
0
370
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
410
Basic Architectures
denyspoltorak
0
120
愛される翻訳の秘訣
kishikawakatsumi
3
350
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
120
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
590
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
450
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
120
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.4k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Claude Code のすすめ
schroneko
67
210k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
29
Evolving SEO for Evolving Search Engines
ryanjones
0
73
Odyssey Design
rkendrick25
PRO
0
440
A Tale of Four Properties
chriscoyier
162
23k
The Invisible Side of Design
smashingmag
302
51k
So, you think you're a good person
axbom
PRO
0
1.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
520
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
130
What's in a price? How to price your products and services
michaelherold
246
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Transcript
Auth0 for AI Agents How to use OAuth to access
third party services from an AI agent Deepu K Sasidharan
@auth0 | @deepu105 | deepu.tech ➔ OSS aficionado, polyglot dev,
author, speaker ➔ JHipster co-chair ➔ Creator of KDash, JDL Studio, JWT UI ➔ Developer Advocate @ Auth0 ➔ Java Champion Hi, I’m Deepu Sasidharan @
[email protected]
deepu.tech @deepu105.bsky.social deepu05
@auth0 | @deepu105 | deepu.tech The Current State of AI
Security Agents, RAG and everything in between
@auth0 | @deepu105 | deepu.tech • Prompt Injection • Sensitive
Information Disclosure • Supply Chain Attacks • Data and Model Poisoning • Improper Output Handling • Excessive Agency • System Prompt Leakage • Vector and Embedding Weaknesses • Misinformation • Unbounded Consumption OWASP LLM top 10
@auth0 | @deepu105 | deepu.tech • Prompt Injection • Sensitive
Information Disclosure • Supply Chain Attacks • Data and Model Poisoning • Improper Output Handling • Excessive Agency • System Prompt Leakage • Vector and Embedding Weaknesses • Misinformation • Unbounded Consumption OWASP LLM top 10
@auth0 | @deepu105 | deepu.tech Identity Challenges for AI-Powered Applications
@auth0 | @deepu105 | deepu.tech • Prompt Injection • Sensitive
Information Disclosure • Supply Chain Attacks • Data and Model Poisoning • Improper Output Handling • Excessive Agency • System Prompt Leakage • Vector and Embedding Weaknesses • Misinformation • Unbounded Consumption OWASP LLM top 10
@auth0 | @deepu105 | deepu.tech Excessive Agency
@auth0 | @deepu105 | deepu.tech Security Challenges Calling APIs Human-in-the-loop
@auth0 | @deepu105 | deepu.tech How to prevent this?
@auth0 | @deepu105 | deepu.tech Calling APIs?
@auth0 | @deepu105 | deepu.tech export const getInfoFromAPI = tool({
description: 'Get information from my own API.' , parameters: z.object({}), execute: async () => { const session = await auth0.getSession(); if (!session) { return 'There is no user logged in.' ; } const response = await fetch(`https://my-own-api` , { headers: { Authorization: `Bearer ${session.tokenSet.accessToken}`, }, }); if (response.ok) { return { result: await response.json() }; } return "I couldn't verify your identity" ; }, }); Call First Party APIs with OAuth
@auth0 | @deepu105 | deepu.tech Third Party APIs?
@auth0 | @deepu105 | deepu.tech OAuth Federation
@auth0 | @deepu105 | deepu.tech Auth0 Token Vault
@auth0 | @deepu105 | deepu.tech
@auth0 | @deepu105 | deepu.tech // Connection for Google services
export const withGoogleConnection = auth0AI.withTokenForConnection ({ connection : 'google-oauth2' , scopes: ['https://www.googleapis.com/auth/calendar.events' ], refreshToken : getRefreshToken , }); // Wrapped tool export const checkUsersCalendarTool = withGoogleConnection ( tool({ description : 'Check user availability on a given date time on their calendar' , parameters : z.object({ date: z.coerce.date() }), execute: async ({ date }) => { // Get the access token from Auth0 AI const accessToken = await getAccessToken (); // Google SDK const calendar = getGoogleCalendar (accessToken ); const response = await calendar .freebusy .query({ auth, requestBody : { timeMin: formatISO (date), timeMax: addHours (date, 1).toISOString (), timeZone : 'UTC', items: [{ id: 'primary' }], }, }); return response .data?.calendars ?.primary?.busy?.length, }; }, }), ); Call Third Party APIs With Auth0 Token Vault
@auth0 | @deepu105 | deepu.tech Human-in-the-loop?
@auth0 | @deepu105 | deepu.tech Async Authorizations with CIBA Client-Initiated
Backchannel Authentication Flow
@auth0 | @deepu105 | deepu.tech
@auth0 | @deepu105 | deepu.tech export const withAsyncAuthorization = auth0AI.withAsyncUserConfirmation({
userID: async () => { const user = await getUser(); return user?.sub as string; }, bindingMessage: async ({ product, qty }) => `Do you want to buy ${qty} of ${product}`, scopes: ['openid', 'product:buy'], audience: process.env['AUDIENCE']!, onUnauthorized: async (e: Error) => { if (e instanceof AccessDeniedInterrupt) { return 'The user has denied the request'; } return e.message; }, }); export const shopOnlineTool = withAsyncAuthorization( tool({ description: 'Tool to buy products online', parameters: z.object({ product: z.string(), qty: z.number() }), execute: async ({ product, qty, priceLimit }) => { const credentials = getCIBACredentials(); const accessToken = credentials?.accessToken; // Use access token to call first party APIs return `Ordering ${qty} ${product} with price limit ${priceLimit}`; }, }), ); Async AuthZ with Auth0
@auth0 | @deepu105 | deepu.tech Assistant0 github.com/auth0-samples/auth0- assistant0
@auth0 | @deepu105 | deepu.tech
@auth0 | @deepu105 | deepu.tech Auth for GenAI a0.to/ai-event
@auth0 | @deepu105 | deepu.tech AI Content from Auth0 https://auth0.com/blog/ai/
Thank You