|
22 | 22 | | Use session based authentication instead of the default JWT based auth. |
23 | 23 | | |
24 | 24 | */ |
25 | | - 'USE_SESSION' => false, |
| 25 | + 'USE_SESSION' => true, |
26 | 26 |
|
27 | 27 | /* |
28 | 28 | |-------------------------------------------------------------------------- |
|
35 | 35 | */ |
36 | 36 | 'USE_TIMESTAMPS' => true, |
37 | 37 |
|
| 38 | + /* |
| 39 | + |-------------------------------------------------------------------------- |
| 40 | + | Set timestamps format |
| 41 | + |-------------------------------------------------------------------------- |
| 42 | + | |
| 43 | + | Use this property to specify the format that you want your timestamps to be saved in. |
| 44 | + | Be aware that auth uses the leafs/date module, so the accepted formats are listed in the leafs/date documentation |
| 45 | + | |
| 46 | + */ |
| 47 | + 'TIMESTAMP_FORMAT' => 'c', |
| 48 | + |
38 | 49 | /* |
39 | 50 | |-------------------------------------------------------------------------- |
40 | 51 | | Encode password |
|
77 | 88 | */ |
78 | 89 | 'PASSWORD_KEY' => 'password', |
79 | 90 |
|
| 91 | + /* |
| 92 | + |-------------------------------------------------------------------------- |
| 93 | + | ID Key |
| 94 | + |-------------------------------------------------------------------------- |
| 95 | + | |
| 96 | + | Set your primary key name. For instance, you might have used id_user instead of id. |
| 97 | + | This setting allows you to quickly switch your key name |
| 98 | + | |
| 99 | + */ |
| 100 | + 'ID_KEY' => 'id', |
| 101 | + |
80 | 102 | /* |
81 | 103 | |-------------------------------------------------------------------------- |
82 | 104 | | Hide id |
|
128 | 150 | */ |
129 | 151 | 'SESSION_ON_REGISTER' => false, |
130 | 152 |
|
| 153 | + /* |
| 154 | + |-------------------------------------------------------------------------- |
| 155 | + | Session redirect on login |
| 156 | + |-------------------------------------------------------------------------- |
| 157 | + | |
| 158 | + | When set to true, the options set in GUARD_LOGIN, GUARD_REGISTER and GUARD_HOME |
| 159 | + | will be used to redirect the user to the right page based on their state. |
| 160 | + | Set to false to not redirect on login |
| 161 | + | |
| 162 | + */ |
| 163 | + 'SESSION_REDIRECT_ON_LOGIN' => true, |
| 164 | + |
| 165 | + /* |
| 166 | + |-------------------------------------------------------------------------- |
| 167 | + | Session redirect on register |
| 168 | + |-------------------------------------------------------------------------- |
| 169 | + | |
| 170 | + | When set to true, the options set in GUARD_LOGIN, GUARD_REGISTER and GUARD_HOME |
| 171 | + | will be used to redirect the user to the right page based on their state. |
| 172 | + | Set to false to not redirect on login |
| 173 | + | |
| 174 | + */ |
| 175 | + 'SESSION_REDIRECT_ON_REGISTER' => true, |
| 176 | + |
| 177 | + /* |
| 178 | + |-------------------------------------------------------------------------- |
| 179 | + | Session lifetime |
| 180 | + |-------------------------------------------------------------------------- |
| 181 | + | |
| 182 | + | Set the lifetime of the session. After this time, the session will expire and the user will have to login again. |
| 183 | + | You can either use '1 day' format or as an integer: 86400 |
| 184 | + | You can also set SESSION_LIFETIME to 0 to disable session expiration. |
| 185 | + | |
| 186 | + */ |
| 187 | + 'SESSION_LIFETIME' => 60 * 60 * 24, |
| 188 | + |
131 | 189 | /* |
132 | 190 | |-------------------------------------------------------------------------- |
133 | 191 | | Login page route |
|
161 | 219 | | JWT + Session |
162 | 220 | |-------------------------------------------------------------------------- |
163 | 221 | | |
164 | | - | Add an auth token to the auth session? |
| 222 | + | Add an auth token to the auth session |
165 | 223 | | |
166 | 224 | */ |
167 | 225 | 'SAVE_SESSION_JWT' => false, |
|
184 | 242 | | How long should JWT be valid for? |
185 | 243 | | |
186 | 244 | */ |
187 | | - 'TOKEN_LIFETIME' => 60 * 60 * 24 * 365, |
| 245 | + 'TOKEN_LIFETIME' => 60 * 60 * 24 * 365 |
188 | 246 | ]; |
0 commit comments