I am using devise for authentication & able to send confirmation email.
I want to know is there any configuration available to expire confirmation link in email after certain duration?
Thanks in advance.
Asked
Active
Viewed 2,781 times
2

Ganesh Kunwar
- 2,643
- 2
- 20
- 36

S R
- 674
- 2
- 18
- 45
1 Answers
6
Have a look at http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Confirmable - the configuration option you're looking for is confirm_within
.
The confirmation token should be generated before the user record is created, that is if the model includes the :confirmable
option.

eugen
- 8,916
- 11
- 57
- 65
-
confirm_within specifies duration for which user is allowed to access site without confirming.. it does not expire link.. – S R Jan 21 '13 at 11:12
-
1`allow_unconfirmed_access_for` does that. `confirm_within` should do what you need. – eugen Jan 21 '13 at 11:15
-
i tried again but confirm_within is not working in manner you suggested. link is not expiring in duraion i have specified..fyi i am using rails 2.3.15 & devise 1.0.11 – S R Jan 21 '13 at 11:23
-
In this case you were correct - for that devise version, `confirm_within` doesn't do what you want. Unless you can upgrade to a newer version, you're stuck. – eugen Jan 21 '13 at 11:25