You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Rack::JWTAuthMiddleware do |token|
data = JWT.decode(token, ExpensesTracker::JWT_SECRET)[0]
ExpensesTracker::User.with(:username, data['username'])
end
About
JWT-based token authentication middleware for Rack.