Merge remote-tracking branch 'origin/main'

This commit is contained in:
Elizabeth Cray 2023-10-05 18:20:07 -04:00
commit 09b2f7a24f
2 changed files with 5 additions and 4 deletions

View File

@ -93,7 +93,7 @@ const generateSSH = async () => {
}
var token = localStorage.getItem("tty_token");
var userData = localStorage.getItem("tty_userData");
if (!token || !userData) {
if (!token || !userData || token == "undefined" || userData == "undefined") {
failMsg("Not Logged In");
return;
}
@ -125,7 +125,7 @@ const testSwal = () => {
const uploadSSH = () => {
var token = localStorage.getItem("tty_token");
var userData = localStorage.getItem("tty_userData");
if (!token || !userData) {
if (!token || !userData || token == "undefined" || userData == "undefined") {
failMsg("Not Logged In");
return;
}
@ -206,7 +206,7 @@ const setUIData = (data) => {
const checkLogin = () => {
// check login status
var token = localStorage.getItem("tty_token");
if (token){
if (token && token !== "undefined"){
var settings = {
url: USE_ORIGIN + "/auth/api/index.php",
method: "POST",

View File

@ -98,7 +98,8 @@ const displayFingerprints = () => {
// On Page Load...
$(() => {
if (localStorage.getItem("tty_token")) {
var token = localStorage.getItem("tty_token");
if (token && token !== "undefined") {
window.location.href = "/auth";
}
// Override domain