I'm using Devise on my Rails 3.0 app, and we currently have confirmable and recoverable turned on. These modules require users to confirm their email account (confirmable) and allow users to reset their password by having an email sent to their email account (recoverable).
Unfortunately we've had difficulty "devising" (pun intended) a reasonable security policy that permits users to use the site without confirming their account. We enforce the following requirements for security:
Confirming your account requires being signed in or signing in. Were this not the case and user A accidentally entered the wrong email address of malicious user B, B would receive the confirm email link, get automatically signed in, and from there could reset the password via "email reset password link." Requiring B to sign in with A's credentials eliminates this possibility.
Resetting your password via email requires having a confirmed email. This is because if user A accidentally enters the wrong email address, one belonging to malicious user B, then B will receive the confirm email link and know that A has signed up for an account. So B can visit the site and use the reset password functionality to change the password on the account, and subsequently can confirm his account. Requiring a confirmed email address eliminates this possibility.
So all is well. Except when user A creates an account, doesn't confirm his account yet, and then returns to the site and forgets his password. Here A is caught in a circular dependency loop, where resetting his password requires confirming his account, but confirming his account requires signing in with a password that he has forgotten.
Two possible solutions:
Requiring users to confirm their account immediately after signing in. This creates more sign-up friction, but eliminates the circular dependency.
Permitting users to reset their password without a confirmed account, but not allowing users to enter any sensitive information or perform critical actions before confirming their account. This way an account hijack by malicious user B is still possible, but he will gain control of an account without any valuable information or power.
Are there better solutions out there? How do companies deal with this issue? I've used several sites that do not require immediate email confirmation, so it'd be nice if we could do this in a way that doesn't require implementing something as complicated as #2.
Thank you!