generates_token_for

Episode #380 by Teacher's Avatar David Kimura

Summary

In Rails 7.1, we're going to get a new feature that will allow us to generate tokens for attributes. With generates_token_for, a token can embed data from a record. When using the token to fetch the record, the data from the token and the data from the record will be compared.
rails 7.1 security 7:55

Chapters

  • Introduction (0:00)
  • Development Starts (2:13)
  • Password Reset (3:33)
  • Upgrade to Rails 7.1.0 alpha (4:53)
  • Using generates_token_for (5:42)
  • Final Thoughts (7:25)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
Autumn Sale
$ 144 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams