1×
Become a member
to unlock all features
Autoplay

    Block Unauthenticated Access to Pages with Vue Router Navigation Guards

    vueVue.js
    >=2.5.22

    Using the beforeEach navigation guard we can set up logic to check for whether authentication is required to access a page. If it is, and the user is unauthenticated, we can route them elsewhere.