File tree Expand file tree Collapse file tree 4 files changed +191
-10
lines changed
packages/shared/src/types Expand file tree Collapse file tree 4 files changed +191
-10
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/shared ' : patch
3+ ---
4+
5+ Add email codes as an option to ` PrepareSecondFactorParams `
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ export type PhoneCodeSecondFactorConfig = {
139139 phoneNumberId ?: string ;
140140} ;
141141
142+ export type EmailCodeSecondFactorConfig = {
143+ strategy : EmailCodeStrategy ;
144+ emailAddressId ?: string ;
145+ } ;
146+
142147export type EmailCodeAttempt = {
143148 strategy : EmailCodeStrategy ;
144149 code : string ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type {
44 EmailCodeAttempt ,
55 EmailCodeConfig ,
66 EmailCodeFactor ,
7+ EmailCodeSecondFactorConfig ,
78 EmailLinkConfig ,
89 EmailLinkFactor ,
910 EnterpriseSSOConfig ,
@@ -117,7 +118,7 @@ export type AttemptFirstFactorParams =
117118 | ResetPasswordPhoneCodeAttempt
118119 | ResetPasswordEmailCodeAttempt ;
119120
120- export type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig ;
121+ export type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig | EmailCodeSecondFactorConfig ;
121122
122123export type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | EmailCodeAttempt ;
123124
You can’t perform that action at this time.
0 commit comments