I want to have a simple authorization before accessing some webpages in Angular, not by using username and password but by using verification code. How am I gonna implement this to keep the user authorized within a certain amount of time?
I want to achieve this by first allowing user to enter an email id, then hit sent code button. Then the user will receive the code, and the user will type the code in the UI. If the code is right, the user will stay authorized for a certain amount of time. Ignore the backend part, how am I going to implement the frontend part along with routing guard? By using cookies, or localStorage? What should I store in them? More specifically when should I return true or false in the canActivate() method in the routing guard?