Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Save login email in cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
IchordeDionysos committed Oct 2, 2016
1 parent ca04bd0 commit 5f3c6b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xtrm-login-dialog/xtrm-login-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ <h2>[[headline]]</h2>
const API_REGISTER_URL = HTML_PROTOCOL + API_BASE_URL + 'register/';

var COOKIE_TOKEN = 'xtrm-token';
var COOKIE_EMAIL = 'xtrm-email';
var EXPIRATION_DAYS = 30;

//noinspection JSUnusedGlobalSymbols
Expand Down Expand Up @@ -168,6 +169,9 @@ <h2>[[headline]]</h2>
Cookies.set(COOKIE_TOKEN, token, {
expires: EXPIRATION_DAYS
});
Cookies.set(COOKIE_EMAIL, this.$.email.value, {
expires: EXPIRATION_DAYS
});
//noinspection JSUnresolvedVariable
this.$.confirmationEmail.classList.add('hidden');
//noinspection JSUnresolvedVariable
Expand Down

0 comments on commit 5f3c6b4

Please sign in to comment.