New automatic login stuff

This commit is contained in:
Vortrex
2022-12-17 14:49:27 -06:00
parent 80795122eb
commit 68b6bee79a
3 changed files with 33 additions and 12 deletions

21
scripts/client/token.js Normal file
View File

@@ -0,0 +1,21 @@
// ===========================================================================
// Asshat Gaming Roleplay
// https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// ===========================================================================
// FILE: token.js
// DESC: Provides "remember me" auto-login token system and functions
// TYPE: Client (JavaScript)
// ===========================================================================
function saveToken(token) {
saveDataToFile("config/client/token.js", token);
}
// ===========================================================================
function loadToken() {
return loadDataFromFile("config/client/token.js");
}
// ===========================================================================