Remove Authentication

This page describes how to remove auth from a theme

Disable Authentication Temporary

Disabling authentication temporarily is generally not recommended due to security risks. However, if you have a specific scenario where you need to disable authentication for a short period, here are some steps you can follow:

  1. In your app-routing.module.ts, the canActivate or canLoad guard is typically used to protect routes. If you want to disable the guard temporarily, you can comment it out.

src/app-routing.module.ts
....

const routes: Routes = [
...
  {
    path: '',
    component: AdminLayout,
    // canActivateChild: [AuthGuardChild],  // Commenting this out temporarily to disable authentication
    children: [
      {
        path: 'dashboard',
        loadChildren: () => import('./demo/dashboard/dashboard.module').then((m) => m.DashboardModule),
        data: { roles: [Role.Admin, Role.User] }
      },
      ....
    ]
    ...
  }
  ...
]

Last updated