backend/app/routing/middleware/auth/GuestOnly.middleware.js

16 lines
439 B
JavaScript
Raw Normal View History

2020-02-08 03:08:24 +00:00
/*
* GuestOnly Middleware
* -------------------------------------------------------------
* Allows the request to proceed unless there's an authenticated user
* in the session. If so, redirect to the auth flow destination if one
* exists. If not, redirect to the default login route.
*/
const Middleware = require('flitter-auth/middleware/GuestOnly')
class GuestOnly extends Middleware {
}
module.exports = GuestOnly