Login to app using a generated PIN

I want to change the user to login, so the user uses their email and a pin generated.

  1. User enters welcome page enters pin
  2. Pin gets generated Users list as password
  3. Pin gets sent to user email ( a custom action would likely be needed to send generated pin)
  4. Page pushes to user enter pin/one-time-password page
  5. User enters pin
  6. Pin validated in the users table
  7. User accesses app

Would love to find the answer to this too!