diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 5a3a3ffb6..0a6ee3176 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -35,8 +35,6 @@ class LoginController extends AbstractLoginController $username = $request->input('user'); $useColumn = $this->getField($username); - sleep(1); - if ($this->hasTooManyLoginAttempts($request)) { $this->fireLockoutEvent($request); $this->sendLockoutResponse($request); diff --git a/resources/assets/pterodactyl/scripts/app.js b/resources/assets/pterodactyl/scripts/app.js index 5586874a6..280b8d6e1 100644 --- a/resources/assets/pterodactyl/scripts/app.js +++ b/resources/assets/pterodactyl/scripts/app.js @@ -18,26 +18,15 @@ window.Ziggy = Ziggy; Vue.use(Vuex); -const store = new Vuex.Store({ - plugins: [ - createFlashStore(), - ], -}); +const store = new Vuex.Store({ plugins: [createFlashStore()] }); const route = require('./../../../../vendor/tightenco/ziggy/src/js/route').default; Vue.config.productionTip = false; -Vue.mixin({ - methods: { - route: route, - }, -}); +Vue.mixin({ methods: { route } }); Vue.use(VueRouter); -Vue.use(VuexFlash, { - mixin: true, - template: require('./components/errors/Flash.template') -}); Vue.use(vuexI18n.plugin, store); +Vue.use(VuexFlash, { mixin: true, template: require('./components/errors/Flash.template') }); Vue.i18n.add('en', Locales.en); Vue.i18n.set('en'); @@ -45,38 +34,21 @@ Vue.i18n.set('en'); const router = new VueRouter({ mode: 'history', routes: [ - { - name: 'login', - path: '/auth/login', - component: Login, - }, - { - name: 'forgot-password', - path: '/auth/password', - component: Login, - }, - { - name: 'checkpoint', - path: '/checkpoint', - component: Login, - }, + { name: 'login', path: '/auth/login', component: Login }, + { name: 'forgot-password', path: '/auth/password', component: Login }, + { name: 'checkpoint', path: '/checkpoint', component: Login }, { name: 'reset-password', path: '/auth/password/reset/:token', component: ResetPassword, props: function (route) { - return { - token: route.params.token, - email: route.query.email || '', - } - }, - } + return { token: route.params.token, email: route.query.email || '' }; + } + }, + { path: '*', redirect: '/auth/login' } ] }); require('./bootstrap'); -const app = new Vue({ - store, - router, -}).$mount('#pterodactyl'); +const app = new Vue({ store, router }).$mount('#pterodactyl'); diff --git a/routes/auth.php b/routes/auth.php index 0511c96e2..b9d015761 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -27,6 +27,9 @@ Route::group(['middleware' => 'guest'], function () { // the forgot password routes to acquire a token (or after an account // is created). Route::post('/password/reset', 'ResetPasswordController')->name('auth.reset-password')->middleware('recaptcha'); + + // Catch any other combinations of routes and pass them off to the Vuejs component. + Route::fallback('LoginController@index'); }); /*