anthonycastelli / Vapor-JWTAuthorization

Vapor JWT Authorization
MIT License
45 stars 2 forks source link

Logout is not protected #1

Closed Casperhr closed 7 years ago

Casperhr commented 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()
anthonycastelli commented 7 years ago

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.

rgkobashi commented 6 years ago

@anthonycastelli where can I look the revised code?