Home  >  Q&A  >  body text

Vue application. How to skip authentication to show certain components?

I am using vue and laravel application. I need to display a component without the user having to log in. Currently, to view components (with security instructions) users must be logged in. But now the component is required externally, which means no login is required to view that particular page. How to achieve this in vue laravel application?

P粉658954914P粉658954914205 days ago453

reply all(1)I'll reply

  • P粉413704245

    P粉4137042452024-03-28 10:47:46

    If your Vue application is protected by "auth" middleware, you will not be able to access it before logging in. Use web middleware where Vue components are required. But to be able to get data through Vue components, you still need token protection like Sanctum.

    reply
    0
  • Cancelreply