I am sending activation link throught email id which inturn is calling after creating user.These are the steps that I am doing:
- Create User Without Credentials.(OKTA API)
- Activating user with send email set as false.(OKTA API)
- Through my own code I am sending activation link to the user.
- After he clicks on activation link it comes to my custom page .
- After he enters password when he clicks on submit SET Password of OKTA API is fired and the user becomes activated.
The problem with this approach is this to not able to avoid MITM attack, as if someone gets access to user email he will be able to set his credentials. What is the best way to avoid this?