---
title: "Discussion on \"Implementing an Authentication in a Ruby on Rails API-only Project using Devise and JWT\" | Hashnode"
description: "Discussion on \"Implementing an Authentication in a Ruby on Rails API-only Project using Devise and JWT\". In this comprehensive guide, we explore implementing authentication mechanisms within a Ruby on Rails API-only project. Harnessing the power of two formidabletools Devise and JSON Web Tokens (JWT), we delve into creating a robust authentication syste..."
url: "https://hashnode.com/posts/implementing-an-authentication-in-a-ruby-on-rails-api-only-project-using-devise-and-jwt/657a0d2da3fe7f884a82338c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Implementing an Authentication in a Ruby on Rails API-only Project using Devise and JWT](https://husseinelgammal.hashnode.dev/implementing-an-authentication-in-a-ruby-on-rails-api-only-project-using-devise-and-jwt?utm_source=hashnode&utm_medium=feed)

In this comprehensive guide, we explore implementing authentication mechanisms within a Ruby on Rails API-only project. Harnessing the power of two formidabletools Devise and JSON Web Tokens (JWT), we delve into creating a robust authentication syste...

Dec 13, 2023 · 16 min read · husseinelgammal.hashnode.dev  
Updated Dec 15, 2023  
Read the article

-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#ruby](https://hashnode.com/tag/ruby)
-   [#backend](https://hashnode.com/tag/backend)
-   [#jwt](https://hashnode.com/tag/jwt)
-   [#rest-api](https://hashnode.com/tag/rest-api)
-   [#software-development](https://hashnode.com/tag/software-development)

## Written by

[Hussien Elgammal](https://hashnode.com/@husseinelgammal)

@husseinelgammal · Alexandria, Egypt

  
[View profile](https://hashnode.com/@husseinelgammal)

Software Engineer

## Responses 2

Markdown supported · ⌘↵ to post

[Emilzon Jeronimo](https://hashnode.com/@Emilzon)

[Aug 8, 2024](https://hashnode.com/posts/implementing-an-authentication-in-a-ruby-on-rails-api-only-project-using-devise-and-jwt/657a0d2da3fe7f884a82338c/comment/66b52db044ca88bc8b615e98)

That library has many errors, for example if you sign in and then sign out, the JTI in User table changes, but the funny thing is that if you sign out again with the last access token, the endpoint returns error because "Couldn't find an active session." but the JTI changes anyway, it doesn't make sense. Also, if you do logout the JTI changes for all users. : (

[pankaj kumar](https://hashnode.com/@pankajroy)

[Dec 23, 2023](https://hashnode.com/posts/implementing-an-authentication-in-a-ruby-on-rails-api-only-project-using-devise-and-jwt/657a0d2da3fe7f884a82338c/comment/658756aeaf481c75b6ca81fe)

Amazing ! Easy to understand, waiting for next one
