Skip to content

Commit a060ffb

Browse files
committed
[*] Exports - Fix broken exports if users restart a new browser session
1 parent 064878b commit a060ffb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change Log
22

33
## [Unreleased]
4+
### Fixed
5+
- Exports - Fix broken exports if users restart a new browser session (ie quit/restart browser).
46

57
## RELEASE 3.0.2 - 2019-05-10
68
### Fixed

app/controllers/forest_liana/sessions_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def process_login(
8484
else
8585
# NOTICE: Set a cookie to ensure secure authentication using export feature.
8686
# NOTICE: The token is empty at first authentication step if the 2FA option is active.
87-
response.set_cookie("forest_session_token", reponse_data[:token]) if reponse_data[:token]
87+
if reponse_data[:token]
88+
response.set_cookie("forest_session_token", { value: reponse_data[:token], expires: (Time.current + 14.days) })
89+
end
8890

8991
render(json: reponse_data, serializer: nil)
9092
end

0 commit comments

Comments
 (0)