diff --git a/lib/extensions/admin/login/index.html b/lib/extensions/admin/login/index.html
index ff77d12..ff442e7 100644
--- a/lib/extensions/admin/login/index.html
+++ b/lib/extensions/admin/login/index.html
@@ -9,7 +9,7 @@
Invalid Magic Link
'{{magic_link}}' isn't a valid magic link code.
-
Links are only good for 5 minutes, so you gotta act fast.
+
Links are only valid for a limited time, so you gotta act fast.
diff --git a/lib/extensions/admin/login/js/app.js b/lib/extensions/admin/login/js/app.js
index c717a12..4400cd7 100644
--- a/lib/extensions/admin/login/js/app.js
+++ b/lib/extensions/admin/login/js/app.js
@@ -53,11 +53,17 @@ function submitCode(pair) {
// shouldn't be pending (because we get here by being ready)
// should poll over 'ready'
+ console.log('Submit Code Response:');
+ console.log(data);
+ if (data.error) {
+ document.querySelector('.js-error').hidden = false;
+ return;
+ }
setTimeout(checkStatus, 0);
document.querySelector('.js-authz').hidden = false;
- console.log(data);
+
/*
document.querySelectorAll('.js-token-data').forEach(function ($el) {
$el.innerText = JSON.stringify(data, null, 2);
@@ -90,6 +96,7 @@ function init() {
if (!magic) {
document.querySelector('body').hidden = false;
document.querySelector('.js-error').hidden = false;
+ return;
}
window.fetch(meta.baseUrl + meta.pair_request.pathname + '/' + magic, {
@@ -97,7 +104,7 @@ function init() {
, cors: true
}).then(function (resp) {
return resp.json().then(function (data) {
- console.log('Data:');
+ console.log('pair request:');
console.log(data);
document.querySelector('body').hidden = false;
if (data.error) {