diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index 31872410a..2bdbcc6e3 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -19,6 +19,7 @@ class PasswordController extends Controller */ use ResetsPasswords; + protected $redirectTo = '/'; /** * Create a new password controller instance. diff --git a/app/Http/Routes/AuthRoutes.php b/app/Http/Routes/AuthRoutes.php index b6847d32a..8f6f0d081 100644 --- a/app/Http/Routes/AuthRoutes.php +++ b/app/Http/Routes/AuthRoutes.php @@ -11,6 +11,14 @@ class AuthRoutes { $router->get('login', [ 'as' => 'auth.login', 'uses' => 'Auth\AuthController@getLogin' ]); $router->post('login', [ 'as' => 'auth.login.submit', 'uses' => 'Auth\AuthController@postLogin' ]); + $router->get('password', [ 'as' => 'auth.password', 'uses' => 'Auth\PasswordController@getEmail' ]); + $router->post('password', [ 'as' => 'auth.password.submit', 'uses' => 'Auth\PasswordController@postEmail' ], function () { + return redirect('auth/password')->with('sent', true); + }); + + $router->get('password/verify/{token}', [ 'as' => 'auth.verify', 'uses' => 'Auth\PasswordController@getReset' ]); + $router->post('password/verify', [ 'as' => 'auth.verify.submit', 'uses' => 'Auth\PasswordController@postReset' ]); + $router->get('logout', [ 'as' => 'auth.logout', 'uses' => 'Auth\AuthController@getLogout' ]); }); } diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index a7c01d8dc..87fa9e453 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -17,6 +17,9 @@ return [ 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 'errorencountered' => 'There was an error encountered while attempting to process this request.', 'resetpassword' => 'Reset Password', + 'confirmpassword' => 'Confirm Password', + 'sendlink' => 'Send Password Reset Link', + 'emailsent' => 'Your password reset email is on its way.', 'remeberme' => 'Remeber Me', ]; diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index ddcca09c7..6b452c4a6 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -12,6 +12,7 @@ return [ 'password' => 'Password', 'email' => 'Email', 'whoops' => 'Whoops', + 'success' => 'Success', 'location' => 'Location', 'node' => 'Node', 'connection' => 'Connection', diff --git a/resources/views/auth/password.blade.php b/resources/views/auth/password.blade.php new file mode 100644 index 000000000..ce3a1f5a9 --- /dev/null +++ b/resources/views/auth/password.blade.php @@ -0,0 +1,48 @@ +@extends('layouts.master') + +@section('title', 'Reset Password') + + +@section('right-nav') +@endsection + +@section('sidebar') +@endsection + +@section('content') +
Hello there! You are receiving this email because you requested a new password for your Pterodactyl account.
+Please click the link below to confirm that you wish to change your password. If you did not make this request, or do not wish to continue simply ignore this email and nothing will happen. This link will expire in 1 hour.
+{{ url('auth/password/verify/'.$token) }}
+Please do not hesitate to contact us if you belive something is wrong. +
Thanks!
Pterodactyl