For a long time, I wondered how can I be able to implement JWT in my rails apps. I had implemented this on Laravel and Django before, but not rails. Recently, I started my own company and I decided to go with Ruby on Rails because I was coding in Ruby and Rails since 2014! I never used Rails as a REST API machine though. So, I decided to do it.
- When you create the migration CreateJwtDenylist, rails automatically calls the table
jwt_denylists, but it must bejwt_denylist. So edit it! - In User requests, you must send a JSON object like this:
{
"user": {
"email": "...",
"password": "..."
}
}