aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Biilmann Christensen <info@mathias-biilmann.net>2017-09-02 18:58:49 -0700
committerMathias Biilmann Christensen <info@mathias-biilmann.net>2017-09-02 18:58:49 -0700
commit029560a64879b44492c85f8d5ccdccdd69991bb3 (patch)
tree81eed0668060fee8942f93867375b9bc572c0faa
parentde769976d336d42fb14c2aaa768d7414dabfef06 (diff)
Fix token acceptance
-rw-r--r--src/js/app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/app.js b/src/js/app.js
index 951bcf3..bdf5699 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -1,11 +1,12 @@
// JS Goes here - ES6 supported
-import gotrue from "gotrue-js";
+import GoTrue from "gotrue-js";
if (document.location.hash) {
const m = document.location.hash.match(/invite_token=([^&]+)/);
if (m) {
document.location.hash = "";
const pw = prompt("Please pick a password")
+ const gotrue = new GoTrue();
gotrue.acceptInvite(m[1], pw)
.then(() => { document.location.href = "/admin/"; })
.catch((err) => alert("Failed to verify invite token :("))