about summary refs log tree commit diff
path: root/companion-lite/src
diff options
context:
space:
mode:
Diffstat (limited to 'companion-lite/src')
-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";
 }