So i am currently developing a web app that will use laravel api for future mobile use and laravel passport. My passport is set up to where i used postman to login, register, and delete an account, the usual functions. The laravel API also works independently as can make the requests from my routes.
Using Passport, i log in, and it returns a token, in which if i am correct, is the token that will be used for the API. Now upon creating the api, which will be accepting the forms/parameter to the main function for my app, How do i use the token i received from Passport with the API?
In the request to the API do i need to ask for the user's token and if so how to check that its a token that can be used from my application. It's this middle part of connecting them i cannot understand, as I can make the passport work by itself, and the laravel api by itself that im just sending the posts/get from postman and getting my json responses that ill use later for my js frontend.
Aucun commentaire:
Enregistrer un commentaire