Closed Casperhr closed 7 years ago
Shouldn't logout route be protected?
since you expect user to be in request
var user = try request.user() user.token = nil try user.save()
There really isn't a need anymore for a logout method since it's not a good idea to store the JWT token in the database. Have a look at the revised code.
@anthonycastelli where can I look the revised code?
Shouldn't logout route be protected?
since you expect user to be in request