Skip to content

Commit eed6567

Browse files
authored
Merge pull request #65 from balajidharma/2.x-Changes
Fixed reset password table issue
2 parents f78d4e9 + 6b24c39 commit eed6567

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

config/auth.php

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
| Authentication Defaults
88
|--------------------------------------------------------------------------
99
|
10-
| This option controls the default authentication "guard" and password
11-
| reset options for your application. You may change these defaults
10+
| This option defines the default authentication "guard" and password
11+
| reset "broker" for your application. You may change these values
1212
| as required, but they're a perfect start for most applications.
1313
|
1414
*/
1515

1616
'defaults' => [
17-
'guard' => 'web',
18-
'passwords' => 'users',
17+
'guard' => env('AUTH_GUARD', 'web'),
18+
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
1919
],
2020

2121
/*
@@ -25,11 +25,11 @@
2525
|
2626
| Next, you may define every authentication guard for your application.
2727
| Of course, a great default configuration has been defined for you
28-
| here which uses session storage and the Eloquent user provider.
28+
| which utilizes session storage plus the Eloquent user provider.
2929
|
30-
| All authentication drivers have a user provider. This defines how the
30+
| All authentication guards have a user provider, which defines how the
3131
| users are actually retrieved out of your database or other storage
32-
| mechanisms used by this application to persist your user's data.
32+
| system used by the application. Typically, Eloquent is utilized.
3333
|
3434
| Supported: "session"
3535
|
@@ -47,12 +47,12 @@
4747
| User Providers
4848
|--------------------------------------------------------------------------
4949
|
50-
| All authentication drivers have a user provider. This defines how the
50+
| All authentication guards have a user provider, which defines how the
5151
| users are actually retrieved out of your database or other storage
52-
| mechanisms used by this application to persist your user's data.
52+
| system used by the application. Typically, Eloquent is utilized.
5353
|
5454
| If you have multiple user tables or models you may configure multiple
55-
| sources which represent each model / table. These sources may then
55+
| providers to represent the model / table. These providers may then
5656
| be assigned to any extra authentication guards you have defined.
5757
|
5858
| Supported: "database", "eloquent"
@@ -62,7 +62,7 @@
6262
'providers' => [
6363
'users' => [
6464
'driver' => 'eloquent',
65-
'model' => App\Models\User::class,
65+
'model' => env('AUTH_MODEL', App\Models\User::class),
6666
],
6767

6868
// 'users' => [
@@ -76,20 +76,24 @@
7676
| Resetting Passwords
7777
|--------------------------------------------------------------------------
7878
|
79-
| You may specify multiple password reset configurations if you have more
80-
| than one user table or model in the application and you want to have
81-
| separate password reset settings based on the specific user types.
79+
| These configuration options specify the behavior of Laravel's password
80+
| reset functionality, including the table utilized for token storage
81+
| and the user provider that is invoked to actually retrieve users.
8282
|
83-
| The expire time is the number of minutes that each reset token will be
83+
| The expiry time is the number of minutes that each reset token will be
8484
| considered valid. This security feature keeps tokens short-lived so
8585
| they have less time to be guessed. You may change this as needed.
8686
|
87+
| The throttle setting is the number of seconds a user must wait before
88+
| generating more password reset tokens. This prevents the user from
89+
| quickly generating a very large amount of password reset tokens.
90+
|
8791
*/
8892

8993
'passwords' => [
9094
'users' => [
9195
'provider' => 'users',
92-
'table' => 'password_resets',
96+
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
9397
'expire' => 60,
9498
'throttle' => 60,
9599
],
@@ -101,11 +105,11 @@
101105
|--------------------------------------------------------------------------
102106
|
103107
| Here you may define the amount of seconds before a password confirmation
104-
| times out and the user is prompted to re-enter their password via the
108+
| window expires and users are asked to re-enter their password via the
105109
| confirmation screen. By default, the timeout lasts for three hours.
106110
|
107111
*/
108112

109-
'password_timeout' => 10800,
113+
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
110114

111-
];
115+
];

phpunit.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
colors="true"
66
>
77
<testsuites>
88
<testsuite name="Unit">
9-
<directory suffix="Test.php">./tests/Unit</directory>
9+
<directory>tests/Unit</directory>
1010
</testsuite>
1111
<testsuite name="Feature">
12-
<directory suffix="Test.php">./tests/Feature</directory>
12+
<directory>tests/Feature</directory>
1313
</testsuite>
1414
</testsuites>
15-
<coverage processUncoveredFiles="true">
15+
<source>
1616
<include>
17-
<directory suffix=".php">./app</directory>
17+
<directory>app</directory>
1818
</include>
19-
</coverage>
19+
</source>
2020
<php>
2121
<env name="APP_ENV" value="testing"/>
22+
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
2223
<env name="BCRYPT_ROUNDS" value="4"/>
23-
<env name="CACHE_DRIVER" value="array"/>
24-
<env name="DB_DATABASE" value="testing"/>
24+
<env name="CACHE_STORE" value="array"/>
25+
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
26+
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
2527
<env name="MAIL_MAILER" value="array"/>
28+
<env name="PULSE_ENABLED" value="false"/>
2629
<env name="QUEUE_CONNECTION" value="sync"/>
2730
<env name="SESSION_DRIVER" value="array"/>
2831
<env name="TELESCOPE_ENABLED" value="false"/>
2932
</php>
30-
</phpunit>
33+
</phpunit>

0 commit comments

Comments
 (0)