ueberauth / guardian

Elixir Authentication
MIT License
3.44k stars 381 forks source link

Use Redis/Memcached as token database instead GuardianDb #526

Closed nicolkill closed 6 years ago

nicolkill commented 6 years ago

The database will be agnostic from the application, why not use Redis or Memcached as database

yordis commented 6 years ago

Hey @nicolkill

This project does not need any database. JWT tokens are stateless so you do not need any database for it.

In some cases, you would use a database and for those cases, Guardian itself does not need to do anything about it. You can check https://github.com/ueberauth/guardian_db for understanding how you could use the API for safe, read and so on the token from databases.

Also, one thing I notice is that you mentioned every database that is commonly used in other stacks where you don't have tools like :ets https://elixir-lang.org/getting-started/mix-otp/ets.html

I would suggest reading about ETS since it could replace those tools (unless you definitely need to use those databases for technical reasons)

From your GitHub account, it seems that you are fairly new into Elixir (don't quote me on it) so I suggest to use the Slack channel to discuss issues before you open it.