mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Fix get_oauth_associate_router import to make it optional
This commit is contained in:
@@ -13,12 +13,12 @@ from fastapi_users.router import (
|
|||||||
get_users_router,
|
get_users_router,
|
||||||
get_verify_router,
|
get_verify_router,
|
||||||
)
|
)
|
||||||
from fastapi_users.router.oauth import get_oauth_associate_router
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from httpx_oauth.oauth2 import BaseOAuth2
|
from httpx_oauth.oauth2 import BaseOAuth2
|
||||||
|
|
||||||
from fastapi_users.router import get_oauth_router
|
from fastapi_users.router import get_oauth_router
|
||||||
|
from fastapi_users.router.oauth import get_oauth_associate_router
|
||||||
except ModuleNotFoundError: # pragma: no cover
|
except ModuleNotFoundError: # pragma: no cover
|
||||||
BaseOAuth2 = Type # type: ignore
|
BaseOAuth2 = Type # type: ignore
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user