UNPKG

pallies

Version:

Robust user management for Hapi

20 lines (15 loc) 373 B
'use strict'; module.exports = { method: 'POST', path: '/logout', options: { auth: { strategy: 'jwt' }, handler: async (request, h) => { const AuthService = h.services().authService; await AuthService.logout(request.auth.credentials); return h.response().code(204); } } };