Skip to content

Commit

Permalink
expire the cookie in an hour
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Oct 3, 2024
1 parent f31c83c commit 9c41159
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.sagebionetworks.web.client.jsinterop.SRC;
import org.sagebionetworks.web.client.mvp.AppActivityMapper;
import org.sagebionetworks.web.client.mvp.AppPlaceHistoryMapper;
import org.sagebionetworks.web.client.place.LoginPlace;
import org.sagebionetworks.web.client.utils.Callback;
import org.sagebionetworks.web.client.utils.CallbackP;
import org.sagebionetworks.web.client.widget.footer.VersionState;
Expand Down Expand Up @@ -616,7 +615,14 @@ public void onPreviewNativeEvent(NativePreviewEvent event) {
@Override
public void gotoLoginPage() {
//tell One Sage to return to the current url
cookieProvider.setCookie(ONESAGE_REDIRECT_COOKIE_KEY, gwt.getCurrentURL());
Date hourFromNow = new Date();
hourFromNow.setTime(hourFromNow.getTime() + (60 * 60 * 1000));

cookieProvider.setCookie(
ONESAGE_REDIRECT_COOKIE_KEY,
gwt.getCurrentURL(),
hourFromNow
);
//go to One Sage to log in
gwt.assignThisWindowWith(gwt.getOneSageURL());
}
Expand Down

0 comments on commit 9c41159

Please sign in to comment.