How to implement stateless session in rails api using auth0

Any gem that can be used to integrate auth0 in rails api codebase that work seamlessly.

We have used knock gem, but for every request it fires database query to get user information.

Known issue: Everytime, every request I have: "User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]" · Issue #154 · nsarno/knock · GitHub

If you check the Rails API quickstart you’ll see a sample implementation that authorizes each endpoint by only validating the access token included in the request. This approach meets your stateless requirement and you could also extend it to validate additional custom information that you may include in the access token.