I generated a keys using the Laravel command php artisan passport:keys
but I don't know where I can find it.
You can store this token in local storage. This token is also stored in the oauth_access_tokens table. We will be sending a GET request to your URL and we need to send it token as Authorization Header. Above way successive technologies can do API authentication in Laravel Application with a passport.
The default path is storage folder. Show activity on this post. When reading the source code I find it gets its path from $keyPath . Which can be set with loadKeysFrom($path) . or uses the default location from storage_path() .
Requesting Tokens Once you have created a password grant client, you may request an access token by issuing a POST request to the /oauth/token route with the user's email address and password. Remember, this route is already registered by the Passport::routes method so there is no need to define it manually.
Check your database. There must be tables about laravel passport. You should post the datas below to '/user' url. You must edit grant_type, client_id and client_secret keys according to values in the oauth_clients table in your database.
The default path is storage folder.
There are two files with the following names:
oauth-private.key
oauth-public.key
Laravel version: 5.8
When reading the source code I find it gets its path from $keyPath
. Which can be set with loadKeysFrom($path)
. or uses the default location from storage_path()
. So this is storage
by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With