Added by Fabio Sousa over 3 years ago
Hello,
Do you have any tips on how I can change automatically the api tokens for all my users ?
Thank you.
Hi, seems quite simple.
From rails console run:
User.all.each do |user|
user.api_token.try(:destroy)
user.reload
end
Please try the code on your own risk (not tested and provided as example, try it in development environment first and see effects).
Thanks
Lorenzo