-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old tokens not being deleted #1183
Comments
@KauNair, hello. devise_token_auth/app/models/devise_token_auth/concerns/user.rb Lines 249 to 256 in 72976d8
Or the second way: user = User.first
user.tokens = {}
user.save I didn't check these ways, but you should try them. |
It looks like this should be handling it:
devise_token_auth/app/models/devise_token_auth/concerns/user.rb Lines 230 to 237 in 72976d8
Might be worth looking at the actual expiry and your server time and seeing if it actually meets these conditions? |
I currently have
config.max_number_of_devices = 6
andconfig.token_lifespan = 10.weeks
but everytime I login it is creating a new token and not deleting the older ones. As a result I have 63 tokens right now which I verified by runningUser.first.tokens.count
Is there a way to delete old tokens?
The text was updated successfully, but these errors were encountered: