MCPcopy Create free account
hub / github.com/fastapi-users/fastapi-users / get_by_oauth_account

Method get_by_oauth_account

tests/conftest.py:392–408  ·  view source on GitHub ↗
(
            self, oauth: str, account_id: str
        )

Source from the content-addressed store, hash-verified

390 return None
391
392 async def get_by_oauth_account(
393 self, oauth: str, account_id: str
394 ) -> UserOAuthModel | None:
395 user_oauth_account = user_oauth.oauth_accounts[0]
396 if (
397 user_oauth_account.oauth_name == oauth
398 and user_oauth_account.account_id == account_id
399 ):
400 return user_oauth
401
402 inactive_user_oauth_account = inactive_user_oauth.oauth_accounts[0]
403 if (
404 inactive_user_oauth_account.oauth_name == oauth
405 and inactive_user_oauth_account.account_id == account_id
406 ):
407 return inactive_user_oauth
408 return None
409
410 async def create(self, create_dict: dict[str, Any]) -> UserOAuthModel:
411 return UserOAuthModel(**create_dict)

Callers 3

test_existing_userMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected