Authentication Remove in Metronics Angular Project
Hi , Iam using Metronics Angular , i need to remove the authentication of metronics , which means that even if i give wrong emaild id and password , so its needs to go dashboard smoothly , can u please inform here which file or code i need to remove authentication . please inform how can i remove Authention in metronic angular project.
Thank you !
Replies (3)
You're welcome! I'm glad I could help. If you have any more questions or need further assistance, feel free to ask. Happy coding!
Thanks
Hi,
To remove authentication in the Metronic Angular project, specifically the canActivate: [AuthGuard] check, follow these steps:
-
Open the
app-routing.module.tsfile located in thesrc/appdirectory of your project. -
Look for the route configuration that contains
canActivate: [AuthGuard]. -
Remove the
canActivate: [AuthGuard]property from that specific route.
For example, if you have a route defined like this:
<pre> { path: '', canActivate: [AuthGuard], loadChildren: () => import('./_metronic/layout/layout.module').then((m) => m.LayoutModule), } </pre>You need to remove the canActivate: [AuthGuard] part, resulting in:
- Save the file.
By removing the canActivate: [AuthGuard] property from the route configuration, you are disabling the authentication check, allowing access to the specified route even with incorrect email and password credentials.
Thanks