I’ve been following the Rails for Beginners tutorial on GoRails. On part 22 we are using Global IDs to create a token to use for password reset when a user has forgotten their password.
However I’ve figured out that we can still use the same token until it’s expired as many times as we want, to reset the password again and again.
I would like the token to be invalidated once it’s been used to reset the password once. I’ve checked the Github page but I couldn’t find anything about invalidating a token explicitly before it’s expiration time.
Can we invalidate a token explicitly before it’s expiration time?