Skip to content

Commit e4b0ac7

Browse files
committed
fix: revert scope naming updates for now
1 parent e3a93c1 commit e4b0ac7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

py-langchain/backend/app/core/auth0_ai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
with_async_authorization = auth0_ai.with_async_authorization(
2323
audience=settings.SHOP_API_AUDIENCE,
2424
# add any scopes you want to use with your API
25-
scopes=["openid", "buy:product"],
25+
scopes=["openid", "product:buy"],
2626
binding_message=lambda product,
2727
quantity: f"Do you want to buy {quantity} {product}",
2828
user_id=lambda *_, **__: ensure_config()

ts-langchain/src/lib/auth0-ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const withAsyncAuthorization = auth0AI.withAsyncAuthorization({
3838
return config?.configurable?._credentials?.user?.sub;
3939
},
4040
bindingMessage: async ({ product, qty }) => `Do you want to buy ${qty} ${product}`,
41-
scopes: ['openid', 'buy:product'],
41+
scopes: ['openid', 'product:buy'],
4242
audience: process.env['SHOP_API_AUDIENCE']!,
4343
/**
4444
* Note: setting a requestedExpiry to >= 301 will currently ensure email is used. Otherwise,

ts-llamaindex/src/lib/auth0-ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const withAsyncAuthorization = auth0AI.withAsyncAuthorization({
2727
return user?.sub as string;
2828
},
2929
bindingMessage: async ({ product, qty }) => `Do you want to buy ${qty} ${product}`,
30-
scopes: ['openid', 'buy:product'],
30+
scopes: ['openid', 'product:buy'],
3131
audience: process.env['AUDIENCE']!,
3232

3333
/**

ts-vercel-ai/src/lib/auth0-ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const withAsyncAuthorization = auth0AI.withAsyncAuthorization({
2727
return user?.sub as string;
2828
},
2929
bindingMessage: async ({ product, qty }) => `Do you want to buy ${qty} ${product}`,
30-
scopes: ['openid', 'buy:product'],
30+
scopes: ['openid', 'product:buy'],
3131
audience: process.env['SHOP_API_AUDIENCE']!,
3232

3333
/**

0 commit comments

Comments
 (0)