CenterForOpenScience/osf.io — pull request #1315 by csheldonhess (2014-12-01 22:05:13+00:00)
Title: [feature] Expire email token

When a user creates an account on the OSF, they receive an email with a link that allows them to confirm their email address. To date, this link had no expiration date, but best practice is that it should.

I added a function to set a link expiration time 24 hours after the creation of the account. I tested it on my machine and confirmed that it works. I also modified a couple of our tests to make room for the change and to confirm that an expired link won't validate.

I might need to add more tests; I'm still not a testing whiz. I'm open to suggestions! Thanks!