So I'm creating a very basic Spree Rails app. I was able to access the Admin panel by just going to http://localhost:3000/admin But after setting up the authentication when I try to access the administration after entering my email and password I get that I have to verify my email. How can I verify my user email using the console?
Unable to access Spree Admin panel after updating the authentication, verify user email from console
Asked
Active
Viewed 473 times
2 Answers
2
This should do the trick,
user = Spree::User.find_by(email: 'spree@example.com')
user.confirm!

Priyank Gupta
- 411
- 3
- 8
-
1tested with spree version 3.6.4, just `user.confirm` without the exclamation mark works. – Roshan Dec 05 '18 at 17:51
0
This worked for me in my Spree Rails app, I think if your using Devise this will work.
user = Spree::User.first
user.password='123456'
user.password_confirmation='123456'
user.email='youremail@example.com'
user.skip_confirmation!
user.save

Steven Aguilar
- 3,107
- 5
- 39
- 89