Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where I can find passport keys in Laravel?

Tags:

php

laravel

I generated a keys using the Laravel command php artisan passport:keys but I don't know where I can find it.

like image 625
Bartosz Rowiński Avatar asked Jul 25 '17 13:07

Bartosz Rowiński


People also ask

Where is laravel Passport token stored?

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.

Where is laravel key stored?

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() .

How can I get Passport token in laravel?

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.

How do I know my Passport is installed in laravel?

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.


2 Answers

The default path is storage folder.

There are two files with the following names:

oauth-private.key

oauth-public.key

Laravel version: 5.8

like image 67
Hamid Parchami Avatar answered Sep 30 '22 18:09

Hamid Parchami


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.

like image 22
online Thomas Avatar answered Sep 30 '22 17:09

online Thomas