play-authenticate icon indicating copy to clipboard operation
play-authenticate copied to clipboard

No verification email sent

Open mshneider opened this issue 10 years ago • 1 comments

In our application, we create the accounts internally, and then we send out the verification e-mails for those accounts at a later point in time.

The problem occurs when one of those users attempts to log in to the site before the verification e-mail has been sent, or before they've actually verified their account. In that case, it incorrectly tells them that a verification e-mail has been sent.

I believe the problem is in UsernamePasswordAuthProvider.authenticate() when the payload == Case.LOGIN, and the LoginResult is USER_UNVERIFIED. It looks like it returns userUnverified() without calling sendVerifyEmailMailing() first.

mshneider avatar Aug 28 '13 16:08 mshneider

It appears that I can work around this be calling:

sendVerifyEmailMailingAfterSignup(u, Context.current());

in my loginUser() implementation before returning LoginResult.USER_UNVERIFIED.

mshneider avatar Aug 28 '13 17:08 mshneider