> For the complete documentation index, see [llms.txt](https://codedthemes.gitbook.io/mantis-vuetify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codedthemes.gitbook.io/mantis-vuetify/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>

   <br>

   <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" color="primary" rounded="md" icon size="large" @click="authStore.logout()">  // click event remove from this line
       &#x3C;LogoutOutlined :style="{ fontSize: '20px' }" />
      &#x3C;/v-btn>
      .....
      
     &#x3C;v-list-item @click="authStore.logout()" color="secondary" rounded="0"> // click event remove from this line
         &#x3C;template v-slot:prepend>
           &#x3C;LogoutOutlined :style="{ fontSize: '14px' }" class="me-4" />
         &#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>

&#x20;Do same like above button @click remove from `src/layouts/dashboard/vertical-   sidebar/extrabox/UserProfile.vue`  file

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

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

......

fakeBackend();

.......
```

{% endcode %}

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

```vue
<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 -
   1. `src/stores/auth.ts`&#x20;
   2. `src/stores/authUser.ts`
   3. `src/utils/helpers`  folder
