Skip to content

Commit a2dd41c

Browse files
authored
Update simple example with authenticate hook
1 parent e15593f commit a2dd41c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ const app = feathers();
2929
app.use('/messages', memory());
3030

3131
app.service('messages').hooks({
32-
before: checkPermissions({
33-
roles: [ 'admin' ]
34-
})
32+
before: [
33+
authenticate('jwt'),
34+
checkPermissions({
35+
roles: [ 'admin' ]
36+
})
37+
]
3538
});
3639

3740
// User from the database

0 commit comments

Comments
 (0)