I installed laravel 5.3 and a passport for folders . I followed the documentation step by step. I can use the following POST /oauth/token route with the following parameters
- Username
- password
- client_secret
- grant_type
- client_id
and I get the following answer
{ "token_type": "Bearer", "expires_in": 31536000, "access_token": "access token here", "refresh_token": "refresh token here" }
then I ask GET /api/user
with the following heading
- Authorization = "Subscriber access icon here"
- accept = application / json (optional)
and this works fine, so all apis.
the problem is I have a user that I authenticated and entered his username and password in the first request and returned the access token that I created from laravel web view / register
How can I create a new user or register a new user from the api route file
like POST /api/register
the user must register for the first time to verify after that.
Should I create this route without oauth for registration, then if the registration is successful, it requests POST /oauth/token for verification or what? Did I miss something?
Updating clent_secret Is it correct to be constant in all user requests, or should each user have a different clent_secret, and if this is how to create a secret secret, if it is not identified for user authentication?
source share