Redirect to register page if mobile number is not in keycloak

Hi ,
Currently we are building a group wide SSO and reviewing different IDAM solutions. We have done keycloak setup using docker for our POC and wondering if following flow can be achieved in Keycloak.
Login/Registration Flow :

  1. User clicks on sign in.
  2. Inputs mobile number.
  3. Gets otp via sms
  4. Inputs otp .
  5. Otp is validated and if its a new user then he is taken to Signup page or he is taken to Application home page if existing.

Can this be achieved?:

  1. mobile number as our primary identifier.
  2. sync our existing users from oracle DB to Keycloak.
  3. For Android/ios we would like to have native experience rather than browser based signin.
  4. Post Otp is validation, if its a new user then he is taken to Signup page else user is issued a token.

Thanks,
Azhar

See: