I want to build a WordPress website that redirects the users to a verification page, after successful login on the login page. This verification page should ask for a 6 digit PIN which should be generated every time the user logs in, and destroyed every time the user logs out. Please, how do I go about it?
closed as too broad by TheDeadMedic, Max Yudin, Howdy_McGee♦ Aug 17 '18 at 14:50
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Read up on the documentation for the filter login_redirect
And also see the answer to this question already answered
I'm not totally sure what you are trying to do with the PIN - is that sent to the user via text/email or displayed on the page?
Either way, the page you redirect to would need to generate the PIN, store it in a (custom) table, then when the user enters the PIN, check the (custom) table on form submission, and then redirect to the page you want them to go after that.