Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from nodes-vapor/login-token-hotfix
Browse files Browse the repository at this point in the history
Login token hotfix
  • Loading branch information
BrettRToomey authored Jan 12, 2017
2 parents 830d8c8 + 480a328 commit 8d7aeda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Update your `Package.swift` file.
```

Create config `jwt.json`
```
```json
{
"secondsToExpire": 3600,
"signatureKey": "our-little-secret"
Expand All @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWTKeychain/Controllers/Api/UsersController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 _ {

Expand Down

0 comments on commit 8d7aeda

Please sign in to comment.