Attempt to clarify installation instructions a little
[vchess.git] / client / src / views / Auth.vue
index 7d682a0..b28ac1e 100644 (file)
@@ -4,7 +4,6 @@ main
     .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
       div(v-if="authOk")
         p {{ st.tr["Authentication successful!"] }}
-        p {{ st.tr["Back to Hall in 3 seconds..."] }}
 </template>
 
 <script>
@@ -22,18 +21,18 @@ export default {
     ajax(
       "/authenticate",
       "GET",
-      { token: this.$route.params["token"] },
-      res => {
-        this.authOk = true;
-        this.st.user.id = res.id;
-        this.st.user.name = res.name;
-        this.st.user.email = res.email;
-        this.st.user.notify = res.notify;
-        localStorage["myname"] = res.name;
-        localStorage["myid"] = res.id;
-        setTimeout(() => {
-          this.$router.replace("/");
-        }, 3000);
+      {
+        credentials: true,
+        data: { token: this.$route.params["token"] },
+        success: (res) => {
+          this.authOk = true;
+          this.st.user.id = res.id;
+          this.st.user.name = res.name;
+          this.st.user.email = res.email;
+          this.st.user.notify = res.notify;
+          localStorage["myname"] = res.name;
+          localStorage["myid"] = res.id;
+        }
       }
     );
   }