From 8338258fda46eac8dda0380eeffba2ef42b76465 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 8 Jul 2024 21:51:29 +0300 Subject: companion-lite: todos for later --- companion-lite/src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'companion-lite') diff --git a/companion-lite/src/main.ts b/companion-lite/src/main.ts index f45cb95..9b7f55f 100644 --- a/companion-lite/src/main.ts +++ b/companion-lite/src/main.ts @@ -159,6 +159,7 @@ if (window.location.search != "") { const grant = await response.json(); + // TODO: refresh tokens? if ("access_token" in grant) { localStorage.setItem("access_token", grant.access_token); (document.getElementById("authorizing") as HTMLElement).style.display = "none"; @@ -172,7 +173,7 @@ const endpoint = localStorage.getItem("micropub_endpoint") if (token == null || endpoint == null) { (document.getElementById("unauthorized") as HTMLElement).style.display = "block"; } else { - (document.getElementById("authorized") as HTMLElement).style.display = "block"; - + // TODO: check token validity micropub = new Micropub({ endpoint: new URL(endpoint), token }); + (document.getElementById("authorized") as HTMLElement).style.display = "block"; } -- cgit 1.4.1