setTimeout in mounted hook doesn't work if delay is greater than 57000ms (57sec)

Viewed 256

I try to logout a user after 10min, so I do the following in my Member.vue (layout) page:

<scrip>
import { mapActions } from "vuex";

export default {
  data: () => ({}),

  methods: {
    ...mapActions("authentication", ["logout"]),
  },

  mounted() {
    setTimeout(this.logout, 60*1000*10);
  },
};
</script>

but the logout function is not executed after 10 min. If I put a delay greater than 57000 (57sec) the function is never executed.

0 Answers
Related