Skip to content

Commit

Permalink
use social auth model
Browse files Browse the repository at this point in the history
  • Loading branch information
caelean committed Jan 7, 2025
1 parent 1b9f3fe commit 4389a56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sentry/users/services/usersocialauth/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from sentry.hybridcloud.rpc import RpcModel
from social_auth.backends import BaseAuth
from social_auth.models import UserSocialAuth
from social_auth.utils import get_backend, tokens


Expand All @@ -26,6 +27,8 @@ def get_backend(self) -> type[BaseAuth] | None:
def tokens(self) -> dict[str, Any]:
return tokens(instance=self)

def auth(self) -> "UserSocialAuth":
return UserSocialAuth.objects.get(id=self.id).auth()

class UserSocialAuthFilterArgs(TypedDict, total=False):
id: int
Expand Down

0 comments on commit 4389a56

Please sign in to comment.