[+] Store token in a field
This commit is contained in:
@@ -52,6 +52,9 @@ export default class App extends Vue
|
|||||||
// Are the course assignments loaded from the server.
|
// Are the course assignments loaded from the server.
|
||||||
public assignmentsReady: boolean = false;
|
public assignmentsReady: boolean = false;
|
||||||
|
|
||||||
|
// Token
|
||||||
|
public token: string = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called when the instance is created.
|
* This is called when the instance is created.
|
||||||
*/
|
*/
|
||||||
@@ -71,8 +74,8 @@ export default class App extends Vue
|
|||||||
// Hide login bar
|
// Hide login bar
|
||||||
this.showLogin = false;
|
this.showLogin = false;
|
||||||
|
|
||||||
// Save token to cookies
|
// Store token
|
||||||
this.$cookies.set('va.token', token, '7d');
|
this.token = token;
|
||||||
|
|
||||||
// Load data
|
// Load data
|
||||||
this.loadAfterLogin();
|
this.loadAfterLogin();
|
||||||
|
|||||||
Reference in New Issue
Block a user