mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Add .env properties for REMEMBER_ME_ENABLED and AUTO_LOGOUT_SECONDS
This commit is contained in:
parent
5704a2d955
commit
d046a298e1
@ -54,6 +54,12 @@ FCM_API_TOKEN=
|
||||
GOOGLE_MAPS_ENABLED=true
|
||||
#GOOGLE_MAPS_API_KEY=
|
||||
|
||||
# Create a cookie to stay logged in
|
||||
#REMEMBER_ME_ENABLED=true
|
||||
|
||||
# The app automatically logs the user out after this number of seconds
|
||||
#AUTO_LOGOUT_SECONDS=28800
|
||||
|
||||
#S3_KEY=
|
||||
#S3_SECRET=
|
||||
#S3_REGION=
|
||||
|
@ -86,6 +86,13 @@ If you need to set a list of trusted proxies you can add a TRUSTED_PROXIES value
|
||||
|
||||
TRUSTED_PROXIES='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
|
||||
|
||||
Stay logged in
|
||||
""""""""""""""
|
||||
|
||||
By default the app clears the session when the browser is closed and automatically logs the user out after 8 hours.
|
||||
|
||||
This can be modified by setting ``REMEMBER_ME_ENABLED`` and ``AUTO_LOGOUT_SECONDS`` in the .env file.
|
||||
|
||||
Customizations
|
||||
""""""""""""""
|
||||
|
||||
|
@ -35,13 +35,15 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (env('REMEMBER_ME_ENABLED'))
|
||||
{{ Former::populateField('remember', 'true') }}
|
||||
{!! Former::hidden('remember')->raw() !!}
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}
|
||||
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
|
||||
</div>
|
||||
{!! Former::hidden('remember')->raw() !!}
|
||||
|
||||
{!! Button::success(trans('texts.login'))
|
||||
->withAttributes(['id' => 'loginButton', 'class' => 'green'])
|
||||
|
@ -228,7 +228,7 @@
|
||||
// auto-logout after 8 hours
|
||||
window.setTimeout(function() {
|
||||
window.location = '{{ URL::to('/logout?reason=inactivity') }}';
|
||||
}, 1000 * 60 * 60 * 8);
|
||||
}, {{ 1000 * env('AUTO_LOGOUT_SECONDS', (60 * 60 * 8)) }});
|
||||
|
||||
// auto-hide status alerts
|
||||
window.setTimeout(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user