Skip to content

Commit

Permalink
Expire cookie if RememberMe button is off (again)
Browse files Browse the repository at this point in the history
I noticed different behavior: logging in with RememberMe button switched off, does not generate a cookieExpirationTime. Logging in with the button switch on, generates an expiration time. However, switching it off (again) does not reset the expiration time. This PR will make it consistent.
  • Loading branch information
peter-scholtens authored Sep 25, 2024
1 parent 3b95c1c commit 8b840e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/test-app/app/components/login-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export default class LoginFormComponent extends Component {

if (this.rememberMe) {
this.session.set('store.cookieExpirationTime', 60 * 60 * 24 * 14);
} else {
this.session.set('store.cookieExpirationTime', null);
}
} catch (response) {
let responseBody = await response.clone().json();
Expand Down

0 comments on commit 8b840e3

Please sign in to comment.