Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

454
Visualizações
Should I have avoided Laravel Breeze and simply used Passport instead for my Laravel API? Or do I use both together?

I'm building an app which requires user authentication.

(Till now I have always built monolithic apps. This is my first attempt at building a backend which is completely decoupled from the front end.)

The backend is a Laravel API and the frontend will be a React app in an independent repo.

Should I have used Laravel Passport instead of Laravel Breeze or are they supposed to be used together? I have never used the former.

Should I refactor my project and remove all Breeze code in order to use Passport instead?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Laravel Breeze isn't intended for use with APIs out of the box. That's not to say it can't be, there is a breeze-api package available which provides all the boilerplate authentication features provided by Breeze to work with APIs.

Passport is a full OAuth workflow authentication provider and quite possibly more hassle than you require if you're just looking to provide authentication for your first-party (your own) SPA or mobile application. If you don't require OAuth then Laravel Sanctum will more likely be a better option for you than Passport.

over 4 years ago · Santiago Trujillo Relatório

0

You should use Laravel Sanctum for this. laravel breeze is basic auth feature

over 4 years ago · Santiago Trujillo Relatório

0

Remove Laravel Breeze and install Laravel Sanctum and Laravel Fortify.

If you're app is running on the same domain or on a subdomain Sanctum will use Laravel's web authentication guard (session-cookie based authentication).

If not Sanctum will look for a valid token in your authorization header.

Fortify will implement all of Laravel's authentication features. This way you got all your endpoints for login, registration, password reset, etc.. set. You can easily customize those methods and their responses.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda