Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
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
21 changes: 12 additions & 9 deletions gotrue/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"zoom",
]

EmailOtpType = Literal[
"signup", "invite", "magiclink", "recovery", "email_change", "email"
]

AuthChangeEventMFA = Literal["MFA_CHALLENGE_VERIFIED"]

AuthChangeEvent = Literal[
Expand Down Expand Up @@ -325,13 +329,7 @@ class VerifyOtpParamsOptions(TypedDict):
class VerifyEmailOtpParams(TypedDict):
email: str
token: str
type: Literal[
"signup",
"invite",
"magiclink",
"recovery",
"email_change",
]
type: EmailOtpType
options: NotRequired[VerifyOtpParamsOptions]


Expand All @@ -345,9 +343,14 @@ class VerifyMobileOtpParams(TypedDict):
options: NotRequired[VerifyOtpParamsOptions]


class VerifyTokenHashParams(TypedDict):
token_hash: str
type: EmailOtpType
options: NotRequired[VerifyOtpParamsOptions]


VerifyOtpParams = Union[
VerifyEmailOtpParams,
VerifyMobileOtpParams,
VerifyEmailOtpParams, VerifyMobileOtpParams, VerifyTokenHashParams
]


Expand Down