> For the complete documentation index, see [llms.txt](https://phoenixcoded.gitbook.io/able-pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://phoenixcoded.gitbook.io/able-pro/vue/how-to/remove-authentication.md).

# Remove Authentication

1. Open below files and remove code from this files<br>

   <pre class="language-typescript" data-title="src/router/index.ts"><code class="lang-typescript">import { useAuthStore } from '@/stores/auth';
   ....

   router.beforeEach(async (to) => {
     const auth = useAuthStore();

     const routeName = String(to.name ?? '');
     const authRequired = routeName.startsWith('/(main)') || to.matched.some((record) => record.meta.requiresAuth === true);

     if (authRequired &#x26;&#x26; !auth.user) {
       auth.returnUrl = to.fullPath;
       return { path: '/login' };
     }

     if (auth.user &#x26;&#x26; to.path === '/login') {
       return { path: auth.returnUrl || '/' };
     }
   });

   ....
   </code></pre>

   <pre class="language-typescript" data-title="src/layouts/dashboard/vertical-header/ProfileDD.vue"><code class="lang-typescript">&#x3C;script setup lang="ts">
   import { useAuthStore } from '@/stores/auth';

   const authStore = useAuthStore();
   &#x3C;/script>

   &#x3C;template>
      ....
      &#x3C;v-btn variant="text" aria-label="logout" color="error" rounded="sm" icon size="large" @click="authStore.logout()">
         &#x3C;SvgSprite name="custom-logout-1" />
      &#x3C;/v-btn>
      .....
      
     &#x3C;v-list-item
       @click="authStore.logout()"
       color="primary"
       :base-color="customizer.actTheme === 'dark' ? 'lightText' : 'secondary'"
       rounded="md"
     >
       &#x3C;template v-slot:prepend>
         &#x3C;div class="me-4">
           &#x3C;SvgSprite name="custom-logout-1" style="width: 18px; height: 18px" />
         &#x3C;/div>
       &#x3C;/template>

       &#x3C;v-list-item-title class="text-headline-small"> Logout&#x3C;/v-list-item-title>
     &#x3C;/v-list-item>
               
       .....     
   &#x3C;/template>
   </code></pre>

{% code title="src/main.ts" %}

```typescript
......
import { fakeBackend } from '@/utils/helpers/fake-backend';

......

fakeBackend();

.......
```

{% endcode %}

{% code title="src/components/authentication/AuthLogin.vue" %}

```typescript
<script setup lang="ts">
.......

import { useAuthStore } from '@/stores/auth'; // Remove it

........

/* eslint-disable @typescript-eslint/no-explicit-any */
function validate(values: any, { setErrors }: any) {
  ........

  // Remove below code from this function
  const authStore = useAuthStore();
  return authStore.login(trimmedUsername, password.value).catch((error) => setErrors({ apiError: error }));
}
</script>
```

{% endcode %}

2. Remove files -\
   `src/stores/auth.ts` \
   `src/stores/authUser.ts` \
   `src/utils/helpers` folder
