> 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/master.md).

# Rails Authentication Guide

トークン認証をしたい！といのがそもそもの始まり。

### Why token authentication ?

以下の比較表によると...

native では、クッキーstorageが使えない

<https://mymemoworkspace.slack.com/files/U9RFWTW9J/FB2CKTBL4/authentication_techniques_for_apis>

### Token authentication の手段

多くのtutorialで&#x306F;**"jwt"**

ここで、本当にjwtが必要？？？と疑問に感じる

\=> 普通の認証oauth2 プロバイダー以外の）では、***必要ではない***

### why not necessary ?

Don't recommend jwt: <https://mymemoworkspace.slack.com/archives/GAPMYN5KJ/p1528057165000041>

### では、代替案は？

store api key in database.

<https://mymemoworkspace.slack.com/archives/GAPMYN5KJ/p1528026040000023>

### security はどうなの？

<https://mymemoworkspace.slack.com/archives/GAPMYN5KJ/p1528838863000331>
