Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel - What are .rnd files after installing Laravel passport?

What is .rnd file that appear after installing Laravel Passport at root? Does it contain any sensitive data? Should we commit it to repo?

like image 711
MJ Khan Avatar asked Oct 14 '19 07:10

MJ Khan


People also ask

What does laravel passport do?

What is Laravel Passport? Laravel Passport is an OAuth 2.0 server implementation for API authentication using Laravel. Since tokens are generally used in API authentication, Laravel Passport provides an easy and secure way to implement token authorization on an OAuth 2.0 server.

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.

How can I get token in laravel passport?

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.


Video Answer


1 Answers

In general the .rnd file is a file that contains random data used for creating unique secure certificates for laravel passport.

Next, you should run the passport:install command. This command will create the encryption keys needed to generate secure access tokens. ...

https://laravel.com/docs/5.8/passport#installation

When deploying Passport to your production servers for the first time, you will likely need to run the passport:keys command. This command generates the encryption keys Passport needs in order to generate access token. The generated keys are not typically kept in source control:

php artisan passport:keys

https://laravel.com/docs/master/passport#deploying-passport

like image 83
julianstark999 Avatar answered Oct 04 '22 06:10

julianstark999