dify/api/tests/unit_tests
Krishna Chaitanya 7c0d2e1d98
fix: handle null email in GitHub OAuth sign-in (#34043)
When a GitHub user's profile email is null (hidden/private), the OAuth callback fails with HTTP 400 because `GitHubRawUserInfo` validates `email` as a required non-null string. Even after the type was relaxed to `NotRequired[str | None]` in #33882, the flow still raises a `ValueError` when no email can be resolved, blocking sign-in entirely.

This PR improves the email resolution strategy so that users with private GitHub emails can still sign in.
2026-03-26 00:41:18 +08:00
..
commands feat: add metrics to clean message and workflow-run task (#33143) 2026-03-17 13:55:28 +08:00
configs refactor: Unify NodeConfigDict.data and BaseNodeData (#32780) 2026-03-11 23:43:58 +08:00
controllers refactor: select in service API wraps, file_preview, and site controllers (#34086) 2026-03-25 23:01:05 +09:00
core refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
extensions feat: Improve SQL Comment Context for Celery Worker Queries (#33058) 2026-03-10 12:37:26 +08:00
factories refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
fields refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
graphon refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
libs fix: handle null email in GitHub OAuth sign-in (#34043) 2026-03-26 00:41:18 +08:00
models refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
oss test(api): add autospec to MagicMock-based patch usage (#32752) 2026-03-01 04:30:45 +08:00
repositories refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
services test: Unit test case for services.dataset_services.py (#33212) 2026-03-26 00:28:48 +08:00
tasks refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
tools refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
utils refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
.gitignore Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
conftest.py refactor: select in service API wraps, file_preview, and site controllers (#34086) 2026-03-25 23:01:05 +09:00