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

Method get_by_oauth_account

fastapi_users/manager.py:94–108  ·  view source on GitHub ↗

Get a user by OAuth account. :param oauth: Name of the OAuth client. :param account_id: Id of the account on the external OAuth service. :raises UserNotExists: The user does not exist. :return: A user of type models.UP.

(self, oauth: str, account_id: str)

Source from the content-addressed store, hash-verified

92 return user
93
94 async def get_by_oauth_account(self, oauth: str, account_id: str) -> models.UP:
95 """
96 Get a user by OAuth account.
97
98 :param oauth: Name of the OAuth client.
99 :param account_id: Id of the account on the external OAuth service.
100 :raises UserNotExists: The user does not exist.
101 :return: A user of type models.UP.
102 """
103 user = await self.user_db.get_by_oauth_account(oauth, account_id)
104
105 if user is None:
106 raise exceptions.UserNotExists()
107
108 return user
109
110 async def create(
111 self,

Callers 1

oauth_callbackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected