Rails 6 API Tutorial - JWT Authentication Service p.20

Опубликовано: 12 Июнь 2026
на канале: Rails Pro
9,377
156

In this video series we will build a Rails API from scratch. Backend APIs are useful for serving data to frontend applications, mobile apps or other backend services.

✨ Check out the new version of this video series, which has been updated for Rails 7    • Rails 7 API Tutorial - Create project and ...  

📖 You can also purchase the eBook and code for the new Rails 7 tutorial - https://tomkadwill.gumroad.com/l/rail...

This video covers:
00:00 - Introduction
00:21 - Service classes
00:45 - Creating a services directory
01:24 - Writing initial test case for an authentication token service
03:54 - defining a class method on the authentication token service
05:12 - Generating a JWT using the ruby-jwt gem
08:42 - Adding JWT decode logic to the spec, to verify the token
10:54 - Removing duplicate code and tidying up
13:41 - Recap of what's left to build for our API authentication

If you’re new to this series, you may want to start with part 1:    • Rails 6 API Tutorial - Create project and ...