Reputation: 67
I am building a wep app (a website) project using Laravel.
I want to build a native mobile app version of it in the future. I know I need to make RESTful APIs routes for the mobile app to consume by users, but I also want the web app to consume the same RESTful APIs routes. I will be using Laravel API authentication (Passport) which will provides a full OAuth2 server.
I am struggling to understand the OAuth2 workflow here, who is:
and how can I make the the (web app) consume its own RESTful APIs?
Upvotes: 0
Views: 414
Reputation: 349
In order to have it clear in your mind you need to translate each one to more understandable terms:
The process is the following and it is really simple:
APPLICATION (Client) makes and Authorisation Request with a valid USER (Resource Owner)
API (Authorisation Server) replies with a token
APPLICATION (Client) tries to access API (Resource Server) passing the token for authentication
You can check this page for more detailed information.
Upvotes: 0