Skip to content

Commit

Permalink
fix: add verify token hash
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Sep 21, 2023
1 parent cb6abab commit da51e8e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions gotrue/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
"zoom",
]

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

AuthChangeEventMFA = Literal["MFA_CHALLENGE_VERIFIED"]

AuthChangeEvent = Literal[
Expand Down Expand Up @@ -325,13 +334,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 @@ -344,10 +347,15 @@ class VerifyMobileOtpParams(TypedDict):
]
options: NotRequired[VerifyOtpParamsOptions]

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

VerifyOtpParams = Union[
VerifyEmailOtpParams,
VerifyMobileOtpParams,
VerifyTokenHashParams
]


Expand Down

0 comments on commit da51e8e

Please sign in to comment.