diff --git a/README.md b/README.md index 8f2a0d8..06c051d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Update your `Package.swift` file. ``` Create config `jwt.json` -``` +```json { "secondsToExpire": 3600, "signatureKey": "our-little-secret" @@ -43,7 +43,7 @@ Register user routes drop.collection(UserRoutes(drop: drop)) ``` -That's it, now you got the following routes out-of-the-box: +That's it, now you'll have the following routes out-of-the-box: - Login: `POST /users/login` - Register: `POST /users` diff --git a/Sources/JWTKeychain/Controllers/Api/UsersController.swift b/Sources/JWTKeychain/Controllers/Api/UsersController.swift index 55202a4..0a323f7 100644 --- a/Sources/JWTKeychain/Controllers/Api/UsersController.swift +++ b/Sources/JWTKeychain/Controllers/Api/UsersController.swift @@ -62,7 +62,7 @@ open class UsersController { try request.auth.login(credentials) - return try request.user().makeJSON() + return try request.user().makeJSON(withToken: true) } catch _ {