Register user with OTP and set password after that

Hello, I would like to create authentication flow which is similar to what atlassian is doing and looks like this:

  1. during registration user needs to provide only email address
  2. then otp code is sent to email
  3. user needs to enter this otp
  4. if otp is correct user in the next step user is asked to provide it’s name and password
  5. after that user uses his email + password to login

Is this possible with keycloack and some extensions or I need to write custom authenticator for this? Can anyone give some tips on that?