token-validator: use cookies instead of localStorage to store auth token

This commit is contained in:
nemunaire 2020-03-01 18:15:19 +01:00
parent 72a4015288
commit a4a7b48a4f
6 changed files with 98 additions and 92 deletions

View file

@ -109,7 +109,7 @@ CREATE TABLE IF NOT EXISTS student_pong(
if _, err := db.Exec(`
CREATE TABLE IF NOT EXISTS student_sessions(
id_session BLOB(255) NOT NULL,
id_student INTEGER NOT NULL,
id_student INTEGER,
time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(id_student) REFERENCES students(id_student)
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;