2-factor authentication

Hi,

I want to make a 2FA login for my website. When a user logs in, it triggers an automation that sends an email to the user. When they click on the link on that email, I want to direct that person to a page where they can review the login. They can see the device’s IP address, the device name, and login date and time. They have the option to deny that login, approve that login or approve the login with a expiry date (the user will be logged out automatically when the time limit set is up). I also want a page where the user can review all the devices logged in to their account, and they can log any device out by clicking on a button. The users have the option to turn off 2FA with a switch on a members page.

However, I’m new to coding. I’m learning to code in the learning center. Can you please put the code in the comments. Many thanks