Migrate Zebra auth integration to daylily-auth-cognito#62
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d65844380d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tokens = asyncio.run( | ||
| cognito_session.exchange_authorization_code_async( |
There was a problem hiding this comment.
Avoid nested event loops in
exchange_code
Calling asyncio.run(...) here will raise RuntimeError whenever exchange_code is invoked from an already-running event loop (for example, from an async FastAPI handler or async integration code), so the OAuth code exchange path can fail at runtime even with valid Cognito inputs. The previous implementation was loop-agnostic because it used a synchronous exchange function; this should either be made async end-to-end or use an event-loop-safe bridge.
Useful? React with 👍 / 👎.
Summary
daylily-auth-cognito2.0 surfacesValidation
/Users/jmajor/projects/daylily/zebra_day/.venv-prep-zebra312/bin/python -m pytest tests/test_auth.py tests/test_modern_web.py tests/test_observability_contract.py tests/test_deploy_contract.py -q