I'm in the process of developing a custom login for a website. Users will not be website users with logins, but rather will be authenticated via an email and a custom token. The process should be as follows:
- User arrives at protected page and must enter an email address ending with @acme.com
- If user's email address ends with @acme.com, then generate a token and send them and email with link including the token.
I am trying to figure out the best way to do this in craft. My initial plan was to create a separate php script which handled the email send and token generation via AJAX, but I figured it's not best practice because it is outwith the CMS, so I should maybe develop this as a plugin.
I wondered if any of you could make some suggestions or perhaps if you'd experience such a process before might shed some light on it.