I understand. You've explained what I really wanted to know, I can learn the implementation specifics myself. I've just misunderstood the 'why' of these things
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).