Skip to content

Commit 68342e0

Browse files
committed
docs: fix imports in anonymous callers snippets in EXAMPLES.md
1 parent e5c159e commit 68342e0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎EXAMPLES.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ An anonymous token is verified like any other. It must be issued for this API's
283283
### Serve everyone, branch in the handler
284284

285285
```python
286-
import asyncio
287286
from auth0_api_python import ApiClient, ApiClientOptions
288287

289288
async def handle_cart(headers):
@@ -303,6 +302,8 @@ async def handle_cart(headers):
303302
### Block anonymous callers on a specific route
304303

305304
```python
305+
from auth0_api_python import ApiClient, ApiClientOptions
306+
306307
async def handle_checkout(headers):
307308
api_client = ApiClient(ApiClientOptions(
308309
domain="your-tenant.auth0.com",
@@ -321,6 +322,8 @@ async def handle_checkout(headers):
321322
The SDK has no global "reject anonymous" switch. Centralize the check in whatever shared layer your framework uses for auth (middleware, a FastAPI dependency, a decorator).
322323

323324
```python
325+
from auth0_api_python import ApiClient, ApiClientOptions
326+
324327
async def require_logged_in_user(headers):
325328
api_client = ApiClient(ApiClientOptions(
326329
domain="your-tenant.auth0.com",

0 commit comments

Comments
 (0)