Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit da51e8e

Browse files
committed
fix: add verify token hash
1 parent cb6abab commit da51e8e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

gotrue/types.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@
4141
"zoom",
4242
]
4343

44+
EmailOtpType = Literal[
45+
"signup",
46+
"invite",
47+
"magiclink",
48+
"recovery",
49+
"email_change",
50+
"email"
51+
]
52+
4453
AuthChangeEventMFA = Literal["MFA_CHALLENGE_VERIFIED"]
4554

4655
AuthChangeEvent = Literal[
@@ -325,13 +334,7 @@ class VerifyOtpParamsOptions(TypedDict):
325334
class VerifyEmailOtpParams(TypedDict):
326335
email: str
327336
token: str
328-
type: Literal[
329-
"signup",
330-
"invite",
331-
"magiclink",
332-
"recovery",
333-
"email_change",
334-
]
337+
type: EmailOtpType
335338
options: NotRequired[VerifyOtpParamsOptions]
336339

337340

@@ -344,10 +347,15 @@ class VerifyMobileOtpParams(TypedDict):
344347
]
345348
options: NotRequired[VerifyOtpParamsOptions]
346349

350+
class VerifyTokenHashParams(TypedDict):
351+
token_hash: str
352+
type: EmailOtpType
353+
options: NotRequired[VerifyOtpParamsOptions]
347354

348355
VerifyOtpParams = Union[
349356
VerifyEmailOtpParams,
350357
VerifyMobileOtpParams,
358+
VerifyTokenHashParams
351359
]
352360

353361

0 commit comments

Comments
 (0)