17229: Webshell use localstorage if available
[arvados-workbench2.git] / public / webshell / index.html
index 77800137517d72fe74d2a31428032719c38c3184..ce903aa08d0e9f7969691e1fa49cf9016dfe1758 100644 (file)
           var token = urlParams.get('token');
           if (token) {
             history.replaceState(null, "", `/webshell/?host=${encodeURIComponent(urlParams.get('host'))}&login=${encodeURIComponent(urlParams.get('login'))}`)
+          } else if (localStorage.getItem('apiToken')) {
+            token = localStorage.getItem('apiToken');
+          } else {
+            // No token
           }
           // change this text when PAM is reconfigured to present a
           // password prompt that we can wait for.