Hi @Andrey Kuznetsov , to call your REST API when the "Send verification code" button is clicked, you can modify the technical profile responsible for sending the verification code. In your case, you should modify the sendOtp
technical profile in the RestfulProvider
claims provider.
Here's an example of how to modify the sendOtp
technical profile to call your REST API for email domain verification:
<TechnicalProfile Id="sendOtp">
<DisplayName>Use email API to send the code to the user and verify email domain</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ServiceUrl">https://myapiservice.com/api/EmailDomainVerification</Item>
<Item Key="AuthenticationType">Basic</Item>
<Item Key="SendClaimsIn">Body</Item>
<Item Key="ClaimUsedForRequestPayload">emailRequestBody</Item>
</Metadata>
<CryptographicKeys>
<Key Id="BasicAuthenticationUsername" StorageReferenceId="B2C_1A_MailjetApiKey" />
<Key Id="BasicAuthenticationPassword" StorageReferenceId="B2C_1A_MailjetSecretKey" />
</CryptographicKeys>
<InputClaimsTransformations>
<InputClaimsTransformation ReferenceId="GenerateEmailRequestBody" />
</InputClaimsTransformations>
<InputClaims>
<InputClaim ClaimTypeReferenceId="emailRequestBody" />
</InputClaims>
</TechnicalProfile>
This modification will call your REST API for email domain verification when the "Send verification code" button is clicked. Make sure to update the ServiceUrl
, AuthenticationType
, and other metadata items as needed to match your API configuration.
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark it as "Verified" so other users can reference it.
Thank you,
James