> For the complete documentation index, see [llms.txt](https://codedthemes.gitbook.io/berry-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/berry-vuetify/how-to/remove-authentication-permanent.md).

# Remove Authentication Permanent

1. Open  `src/pages/(main).vue`

```typescript
<route lang="json">
{
  "meta": {
    "requiresAuth": false // set to false
  }
}
</route>
```

2. **Remove/delete** below codes from this files:

{% code title="src/router/index.ts" %}

```typescript
import { useAuthStore } from '@/stores/auth'; 

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

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

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

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

{% endcode %}

{% code title="src/layouts/full/vertical-header/ProfileDD.vue" %}

```typescript
import { useAuthStore } from '@/stores/auth';

const authStore = useAuthStore();

<v-list-item color="secondary" rounded="md" @click="authStore.logout()"> // Remove only click event
```

{% endcode %}

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

```typescript
import { useAuthStore } from '@/stores/auth';

/* eslint-disable @typescript-eslint/no-explicit-any */
function validate(values: any, { setErrors }: any) {
  // Trim the username before validation
  const trimmedEmail = username.value.trim();

  // Update the username with trimmed value
  username.value = trimmedEmail;

  const authStore = useAuthStore();
  return authStore.login(username.value, password.value).catch((error) => setErrors({ apiError: error }));
}

<Form @submit="validate" class="mt-7 loginForm" v-slot="{ errors, isSubmitting }"> // Remove only @submit event
```

{% endcode %}

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

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

fakeBackend();
```

{% endcode %}

&#x20;

3. **Remove the below list of files and directories.**

```
berry-vuetify-vuejs
..
├── src
│   ├── stores    
│   │   ├── auth.ts
│   │   ├── authUser.ts
│   ├── utils    
│   │   ├── helpers
│   │   │   ├── fake-backend.ts
│   │   │   ├── fetch-wrapper.ts
```
