Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions workos/types/user_management/authentication_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Literal, Optional, TypeVar
from workos.types.user_management.impersonator import Impersonator
from workos.types.user_management.oauth_tokens import OAuthTokens
from workos.types.user_management.user import User
from workos.types.workos_model import WorkOSModel

Expand Down Expand Up @@ -34,6 +35,7 @@ class AuthKitAuthenticationResponse(AuthenticationResponse):
"""Representation of a WorkOS User and Organization ID response."""

impersonator: Optional[Impersonator] = None
oauth_tokens: Optional[OAuthTokens] = None


class RefreshTokenAuthenticationResponse(_AuthenticationResponseBase):
Expand Down
20 changes: 20 additions & 0 deletions workos/types/user_management/oauth_tokens.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from typing import Literal, Sequence

from workos.types.workos_model import WorkOSModel

OAuthTokensProvidersType = Literal[
"AppleOauth",
"GitHubOauth",
"GoogleOauth",
"MicrosoftOauth",
]


class OAuthTokens(WorkOSModel):
"""Representation of a WorkOS Dashboard member impersonating a user"""

provider: OAuthTokensProvidersType
access_token: str
refresh_token: str
expires_at: int
scopes: Sequence[str]
Loading