about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-07-08 21:51:29 +0300
committerVika <vika@fireburn.ru>2024-07-08 21:51:29 +0300
commit8338258fda46eac8dda0380eeffba2ef42b76465 (patch)
tree6314c9f5d30b5079753256451ffa3110b5654c26
parent2f33ce7ecf96fedf4fc8511e6d57c459de2ffabc (diff)
companion-lite: todos for later
-rw-r--r--companion-lite/src/main.ts5
1 files changed, 3 insertions, 2 deletions
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";
 }