Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

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 !


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

To remove authentication in the Metronic Angular project, specifically the `canActivate: [AuthGuard]` check, follow these steps:

1. Open the `app-routing.module.ts` file located in the `src/app` directory of your project.

2. Look for the route configuration that contains `canActivate: [AuthGuard]`.

3. Remove the `canActivate: [AuthGuard]` property from that specific route.

For example, if you have a route defined like this:


{
path: "",
canActivate: [AuthGuard],
loadChildren: () =>
import("./_metronic/layout/layout.module").then((m) => m.LayoutModule),
}


You need to remove the `canActivate: [AuthGuard]` part, resulting in:


{
path: "",
loadChildren: () =>
import("./_metronic/layout/layout.module").then((m) => m.LayoutModule),
}


4. 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



Thank you Faizal



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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(