User Autoenrollment token with verifty SMS OTP

Hello,

I need help with doing auto enrollment for end users from webui.

When user login to webui for auto enrollment when or before scan QR Code they should get SMS OTP for verification. If the users enter wrong SMS OTP it should not enroll. This is for security reasons.

Please help me in this. Provide me what policy i need to create and what event handler.