[ 
https://issues.apache.org/jira/browse/FLAGON-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16904313#comment-16904313
 ] 

Joshua Poore commented on FLAGON-441:
-------------------------------------

That was easy!

I added a function to /getInitialSettings

export function getSessionId(sessionKey, value){
 if (sessionStorage.getItem(sessionKey) === null) {
 var storedSession = value;
 sessionStorage.setItem(sessionKey, value);
 } else {
 storedSession = sessionStorage.getItem(sessionKey);
 }
 return storedSession;
}

then I added this function to the settings.sessionID params:

settings.sessionID = get('data-session') || getSessionId("userAleSessionId", 
'session_' + String(Date.now()));

This works!

Now, while I'm on a page, I can refresh away and submit forms, without reseting 
the sessionId!

However...

> utilize sessionStorage for sessionId so that sessionId isn't cleared until 
> the tab is closed.
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLAGON-441
>                 URL: https://issues.apache.org/jira/browse/FLAGON-441
>             Project: Flagon
>          Issue Type: Sub-task
>          Components: UserALE.js
>    Affects Versions: UserALE.js 2.1.0
>            Reporter: Joshua Poore
>            Assignee: Joshua Poore
>            Priority: Major
>             Fix For: UserALE.js 2.1.0
>
>
> we can build sessionId the same way as we do, but it needs to be passed to, 
> checked for, and ingested from sessionId to keep sessionId from regenerating 
> on refresh (incl. submit).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to