Hmm. The req res passed to the middleware have to be a certain shape, but those can read from any source. For example, the req object we expect has a getJSONBody function, but that function could read from form post request and convert it to a JS object and return that.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).