1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00

Fix password reset system

This commit is contained in:
Dane Everitt 2016-01-16 21:57:10 -05:00
parent 8e92f96999
commit 861af87e93
7 changed files with 11 additions and 14 deletions

View File

@ -22,6 +22,7 @@ MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM=you@example.com
API_PREFIX=api
API_VERSION=v1

View File

@ -19,6 +19,7 @@ class PasswordController extends Controller
*/
use ResetsPasswords;
protected $redirectTo = '/';
/**

View File

@ -35,26 +35,21 @@ class AuthRoutes {
// Show Password Reset Form
$router->get('password', [
'as' => 'auth.password',
'uses' => 'Auth\PasswordController@getEmail'
]);
// Handle Password Reset
$router->post('password', [
'as' => 'auth.password.submit',
'uses' => 'Auth\PasswordController@postEmail'
], function () {
return redirect('auth/password')->with('sent', true);
});
]);
// Show Verification Checkpoint
$router->get('password/verify/{token}', [
'as' => 'auth.verify',
$router->get('password/reset/{token}', [
'uses' => 'Auth\PasswordController@getReset'
]);
// Handle Verification
$router->post('password/verify', [
$router->post('password/reset', [
'uses' => 'Auth\PasswordController@postReset'
]);

View File

@ -54,7 +54,7 @@ return [
|
*/
'from' => ['address' => null, 'name' => null],
'from' => ['address' => env('MAIL_FROM'), 'name' => env('MAIL_FROM_NAME', 'Pterodactyl Panel')],
/*
|--------------------------------------------------------------------------

View File

@ -10,7 +10,7 @@
@endsection
@section('content')
<div class="col-md-6">
<div class="col-md-8">
<form action="/auth/password" method="POST">
<legend>{{ trans('auth.resetpassword') }}</legend>
<fieldset>

View File

@ -10,8 +10,8 @@
@endsection
@section('content')
<div class="col-md-6">
<form action="/auth/password/verify" method="POST">
<div class="col-md-8">
<form action="/auth/password/reset" method="POST">
<legend>{{ trans('auth.resetpassword') }}</legend>
<fieldset>
<input type="hidden" name="token" value="{{ $token }}">

View File

@ -7,8 +7,8 @@
<center><h1>Pterodactyl Lost Password Recovery</h1></center>
<p>Hello there! You are receiving this email because you requested a new password for your Pterodactyl account.</p>
<p>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. <strong>This link will expire in 1 hour.</strong></p>
<p><a href="{{ url('auth/password/verify/'.$token) }}">{{ url('auth/password/verify/'.$token) }}</a></p>
<p><a href="{{ url('auth/password/reset/'.$token) }}">{{ url('auth/password/reset/'.$token) }}</a></p>
<p>Please do not hesitate to contact us if you belive something is wrong.
<p>Thanks!<br />Pterodactyl</p>
</body>
</html>
</html>