File tree Expand file tree Collapse file tree 5 files changed +20
-2
lines changed
connectors/connector-logto-email/src
core/src/routes/experience/verification-routes
integration-tests/src/__mocks__
toolkit/connector-kit/src/types Expand file tree Collapse file tree 5 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @logto/connector-kit " : minor
3+ ---
4+
5+ add bindMFA to template type
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const sendMessage =
4040 body : {
4141 data : {
4242 to,
43+ // @ts -expect-error TODO @wangsijie: remove this when @logto/cloud updates
4344 type,
4445 payload : {
4546 ...payload ,
Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ export default function verificationCodeRoutes<T extends ExperienceInteractionRo
5858 libraries ,
5959 queries ,
6060 identifier ,
61- // If the interaction already identified a user, we are binding a new identifier
61+ // If the interaction already identified a user, we are binding a new MFA verification
6262 ctx . experienceInteraction . identifiedUserId
63- ? TemplateType . BindNewIdentifier
63+ ? TemplateType . BindMfa
6464 : getTemplateTypeByEvent ( interactionEvent )
6565 ) ,
6666 libraries,
Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ export const mockSmsConnectorConfig = {
130130 usageType : 'MfaVerification' ,
131131 content : 'This is for MFA verification purposes only. Your passcode is {{code}}.' ,
132132 } ,
133+ {
134+ usageType : 'BindMfa' ,
135+ content : 'This is for binding MFA purposes only. Your passcode is {{code}}.' ,
136+ } ,
133137 ] ,
134138} ;
135139
@@ -193,6 +197,12 @@ export const mockEmailConnectorConfig = {
193197 subject : 'Logto MFA Verification Template' ,
194198 content : 'This is for MFA verification purposes only. Your passcode is {{code}}.' ,
195199 } ,
200+ {
201+ usageType : 'BindMfa' ,
202+ type : 'text/plain' ,
203+ subject : 'Logto Bind MFA Template' ,
204+ content : 'This is for binding MFA purposes only. Your passcode is {{code}}.' ,
205+ } ,
196206 ] ,
197207} ;
198208
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ export enum TemplateType {
3636 BindNewIdentifier = 'BindNewIdentifier' ,
3737 /** The template for sending MFA verification code. */
3838 MfaVerification = 'MfaVerification' ,
39+ /** The template for binding MFA verification. */
40+ BindMfa = 'BindMfa' ,
3941}
4042
4143export const templateTypeGuard = z . nativeEnum ( TemplateType ) ;
You can’t perform that action at this time.
0 commit comments