> For the complete documentation index, see [llms.txt](https://kohhepeace.gitbook.io/rails-authentication-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kohhepeace.gitbook.io/rails-authentication-guide/introduction.md).

# Introduction

## Why ?

When I start to make SPA and API with rails, a lot of tutorial is using&#x20;

**"jwt" : "json web token"**

But, if you are using devise, the option for api is ...&#x20;

* [Devise Token Auth](https://github.com/lynndylanhurley/devise_token_auth)
* [Simple Token Authentication](https://github.com/gonzalo-bulnes/simple_token_authentication)
* [Tiddle](https://github.com/adamniedzielski/tiddle)
* Make sure to read [this gist by José Valim](https://gist.github.com/josevalim/fb706b1e933ef01e4fb6) if you want to implement token authentication yourself.

[**https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example**](https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example)

***Neither of them uses "jwt" !***

That's why I'm confused...&#x20;

#### *"what is the best way to implement the authentication for rails api ?"*
