Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
What are the differences between these 2? And which one is better for a simple VueJS app?
I've read their documents a few times but still confused.
Thank you very much.
Passport provides a full OAuth2 server implementation for your Laravel application in a matter of minutes. It is therefore necessary to have a brief knowledge of OAuth2.
Sanctum it is a simple package to issue API tokens to your users without the complication of OAuth. Sanctum uses Laravel's built-in cookie based session authentication services.
In a small application use Sanctum. it's simple and easy.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm working with laravel 6.x and 8.x for my applications. I was trying to find a way to protect my api routes with csrf protection, but it seems impossible to do it.
So I looked for another way to protect my api routes, and I found Laravel Passport : https://laravel.com/docs/8.x/passport
I keep reading the documentation and i don't really understand how it works.
So I post this so that someone can explain to me how Laravel Passport can be implemented in my applications.
Thanks for your help. :)
Check this url. It was very simple.
Toptal:Laravel-passport-tutorial
If you don`t get, you can research vie youtube too.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm creating an erp with laravel + larvel nova, a rest api with laravel and frontend with vuejs. My doubt is: where should i build my database migration as better practice, should i put my migration in my erp project or in my api rest project. Both will use the same database.
My suggestion is to create your migration in Rest Api beacuse api most work is in database and you want to give data(which is in Database) to user in most cases with Api!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am new to APIs. I want to make an API-centric Laravel web app and an Android app. They will use private API.
I am not sure how to make the user auth for the API. I have read many articles about JWT and many more about OAuth2 but I am still not sure which one to use and how to actually make it.
I recommend that you read through this very digestable book - https://apisyouwonthate.com/. It helps with the theory and the implementation of an API in Laravel. Although the code is specifically for Laravel 4, virtually everything in the book is still helpful.
Starting in Laravel 5.2, the framework has been providing support for token authentication and web form authentication right out of the box. https://www.laravel.com/docs/5.3/passport
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can we call web api with Https protocol instead of Http ?? If yes, then how can we ?
I have tried with Https; But it is not calling my web api method.
Any help on this appreaciated.
Yes. [1]
The steps are rather involved and I'm not sure if all can be summarised here.
Disclaimer: This answer most likely suffers from Your answer is in another castle: when is an answer not an answer?
All is revealed in the link below but essentially:
Create a certificate for the purpose of SSL
Add a HTTPS binding to IIS
Update URLs to use the new HTTPS address
More
[1] Working with SSL in Web API
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am very new to ASP.NET MVC 3 (and MVC in general for that matter). In ASP.NET Web Forms, I did authentication using Principals and Identities. Is this the recommended way to do it in MVC or is there something newer? I see a Membership class, but if I understand it correctly it is too heavyweight for what I need.
Does any one have a good tutorial or site recommendation to help me out with this? It can be comprehensive as I still don't have this stuff solidified.
Thanks.
FYI, here's a nice blog post about how to integrate IIdentity and IPrincipal with MVC 3
http://www.bradygaster.com/post/custom-authentication-with-mvc-3.0