laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.13k stars 10.87k forks source link

Passport issue in laravel 11 #51144

Closed Dhairyapatel273 closed 4 months ago

Dhairyapatel273 commented 4 months ago

Laravel Version

11.4

PHP Version

8.2.12

Database Driver & Version

MariaDB 10.4.32

Description

passport is alreay installed in my project but when i execute "php artisan passport:install" command in my vscode terminal it generates new migrations everytime in the same project and asks me to run migration of the remaining tables remaining tables includes newly generated passport migration`s table Screenshot 2024-04-20 002303 this is issue is coming in my device for the second time

Steps To Reproduce

Step 1: create new laravel project with latest version step 2: execte command "composer require passport" Error: it throws error of denependenices and required package sodium Solution: execute command "composer require passport --ignore-platform-reqs" then it will work. Step 3:after this everytime you run command "php artisan passport:install". It showing the above bug.https://github.com/Dhairyapatel273/Farm-Management.git

akr4m commented 4 months ago

For Laravel 11, why are running this command composer require passport? Laravel <10 version used to run this command. In latest L11 documentation, you don't have to run that command. Run php artisan install:api --passport command.

This command will publish and run the database migrations necessary for creating the tables your application needs to store OAuth2 clients and access tokens. The command will also create the encryption keys required to generate secure access tokens.

Dhairyapatel273 commented 4 months ago

Good morning sir/madam

I`m writing this mail as with your help i resolved the issue of passport access token generation here is the file in attachment how my bug is solved.

I referred the documentation of laravel 11 but the problem in my documentation about sodium extension was there that`why i used the command "composer require passport" but it still throw the same error of sodium so i executed the command "composer require passport --ignore-platform-reqs" and then "php artisan passport:install" so the bug i reported was created by this process.

Again, thanks for the help. Have a nice day sir/madam.

On Sun, Apr 21, 2024 at 3:48 AM AkrAm @.***> wrote:

For Laravel 11, why are running this command composer require passport? Laravel <10 version used to run this command. In latest L11 documentation https://laravel.com/docs/11.x/passport#installation, you don't have to run that command. Run php artisan install:api --passport command.

This command will publish and run the database migrations necessary for creating the tables your application needs to store OAuth2 clients and access tokens. The command will also create the encryption keys required to generate secure access tokens.

— Reply to this email directly, view it on GitHub https://github.com/laravel/framework/issues/51144#issuecomment-2067801924, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDVHHXGTPNHAYRPHK4YHTLY6LSSZAVCNFSM6AAAAABGPXOBIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXHAYDCOJSGQ . You are receiving this because you authored the thread.Message ID: @.***>

driesvints commented 4 months ago

passport is alreay installed in my project but when i execute "php artisan passport:install" command

You don't need to re-run this command if you have passport already installed.

Dhairyapatel273 commented 4 months ago

My personal access token and password grant client is not generating successfully that's why I executed multiple times

On Mon, 22 Apr, 2024, 3:16 pm Dries Vints, @.***> wrote:

passport is alreay installed in my project but when i execute "php artisan passport:install" command

You don't need to re-run this command if you have passport already installed.

— Reply to this email directly, view it on GitHub https://github.com/laravel/framework/issues/51144#issuecomment-2068957236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDVHHRHYDREMPHL6ZWLFADY6TL75AVCNFSM6AAAAABGPXOBIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYHE2TOMRTGY . You are receiving this because you authored the thread.Message ID: @.***>