Passport: Passport for laravel 5.5?

Created on 8 Feb 2018  ·  27Comments  ·  Source: laravel/passport

I can see that the version 2.0-4.0 is using laravel 5.4
And the version 5.0 is using laravel 5.6

So, is there any passport version to use with laravel 5.5?

Most helpful comment

Same issue here with Laravel 5.5.42 and the only way to install laravel/passport is by manually add laravel/passport: '~4.0' to my composer.json & run composer update.

All 27 comments

I'm in trouble with the same problem.

cannot install laravel/passport.

$ php artisan --version
Laravel Framework 5.5.33

part of my composer.json

    "require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~6.0",
        "symfony/thanks": "^1.0"
    },
$ composer require laravel/passport
    Finished: success: 0, skipped: 0, failure: 11, total: 11
Using version ^5.0 for laravel/passport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - don't install illuminate/support v5.6.0|don't install laravel/framework v5.5.33
    - don't install illuminate/support v5.6.0|remove laravel/framework v5.5.33
    - don't install illuminate/support v5.6.0|don't install laravel/framework v5.5.33
    - laravel/passport v5.0.0 requires illuminate/support ~5.6 -> satisfiable by illuminate/support[v5.6.0].
    - Installation request for laravel/passport ^5.0 -> satisfiable by laravel/passport[v5.0.0].
    - Installation request for laravel/framework (locked at v5.5.33, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.33].


Installation failed, reverting ./composer.json to its original content.

failure.

then, I tried install with specific version.
it was succeed.

$ composer require laravel/passport "4.0.3"
    Finished: success: 0, skipped: 0, failure: 3, total: 3
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
    Finished: success: 0, skipped: 0, failure: 13, total: 13
Package operations: 13 installs, 0 updates, 0 removals
  - Installing psr/http-message (1.0.1): Downloading (100%)
  - Installing zendframework/zend-diactoros (1.7.0): Downloading (100%)
  - Installing symfony/psr-http-message-bridge (v1.0.2): Downloading (100%)
  - Installing phpseclib/phpseclib (2.0.9): Downloading (100%)
  - Installing defuse/php-encryption (v2.1.0): Downloading (100%)
  - Installing lcobucci/jwt (3.2.2): Downloading (100%)
  - Installing league/event (2.1.2): Downloading (100%)
  - Installing league/oauth2-server (6.1.1): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.3.0): Downloading (100%)
  - Installing firebase/php-jwt (v5.0.0): Downloading (100%)
  - Installing laravel/passport (v4.0.3): Downloading (100%)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
lcobucci/jwt suggests installing mdanter/ecc (Required to use Elliptic Curves based algorithms.)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/passport
Discovered Package: laravel/tinker
Package manifest generated successfully.

is this correct way?

Which is your PHP-Cli version?
I've installed Passport 4.0 on Laravel 5.5.33 and it works ok!
My PHP-Cli version is 7.1.5 on Win7 64bit.

I am having sort of the same problem

ilyas@ubuntuDesktop:~/script/minerc.tl$ composer require laravel/passport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for laravel/passport ^5.0.0 -> satisfiable by laravel/passport[v5.0.0].
    - Conclusion: remove laravel/framework v5.5.33
    - Conclusion: don't install laravel/framework v5.5.33
    - laravel/passport v5.0.0 requires illuminate/http ~5.6 -> satisfiable by illuminate/http[v5.6.0, v5.6.1, v5.6.2, v5.6.3].
    - don't install illuminate/http v5.6.0|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.1|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.2|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.3|don't install laravel/framework v5.5.33
    - Installation request for laravel/framework == 5.5.33.0 -> satisfiable by laravel/framework[v5.5.33].
'''

Installation failed, reverting ./composer.json to its original content.

using composer require laravel/passport "4.0.3" as stated above, did work in my case.

Same problem here as several others above.

Also seeing this issue....

me too

I also got the same problem
Problem 1
- illuminate/contracts v5.6.3 requires php ^7.1.3 -> your PHP version (7.0.25) does not satisfy that requirement.
- illuminate/contracts v5.6.2 requires php ^7.1.3 -> your PHP version (7.0.25) does not satisfy that requirement.
- illuminate/contracts v5.6.1 requires php ^7.1.3 -> your PHP version (7.0.25) does not satisfy that requirement.
- illuminate/contracts v5.6.0 requires php ^7.1.3 -> your PHP version (7.0.25) does not satisfy that requirement.
- laravel/passport v5.0.0 requires illuminate/contracts ~5.6 -> satisfiable by illuminate/contracts[v5.6.0, v5.6.1, v5.6.2, v5.6.3].
- Installation request for laravel/passport ^5.0 -> satisfiable by laravel/passport[v5.0.0].

Oh It seems laravel passport v5.0.0 needs php7.1.3 and higher.
So either we can upgrade php version on reduce the passport vesion.
Which can resolve the issue

EDIT: Updating to laravel 5.6.* resolved it for me. Passport 5.0 must not be compatible with laravel 5.5.33

I've got the same problem but my PHP version is

php --version
PHP 7.2.2-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb  6 2018 16:11:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.2-3+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
 Problem 1
    - Installation request for laravel/passport ^5.0 -> satisfiable by laravel/passport[v5.0.0].
    - Conclusion: remove laravel/framework v5.5.33
    - Conclusion: don't install laravel/framework v5.5.33
    - laravel/passport v5.0.0 requires illuminate/http ~5.6 -> satisfiable by illuminate/http[v5.6.0, v5.6.1, v5.6.2, v5.6.3].
    - don't install illuminate/http v5.6.0|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.1|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.2|don't install laravel/framework v5.5.33
    - don't install illuminate/http v5.6.3|don't install laravel/framework v5.5.33
    - Installation request for laravel/framework == 5.5.33.0 -> satisfiable by laravel/framework[v5.5.33].

Here is my Require Block in composer for Laravel 5.5.* and it is working well!

"require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.5.*",
        "laravel/passport": "^4.0",
        "laravel/tinker": "~1.0",
        "laravelcollective/html": "^5.5",
        "moontoast/math": "^1.1",
        "optimus/api-consumer": "0.2.*",
        "tymon/jwt-auth": "^0.5.12",
        "webpatser/laravel-uuid": "^3.0"
    },

@kjhatis Can I ask why you have tymon/jwt-auth and also laravel/passport?

This solves the issue https://ayesh.me/Ubuntu-PHP-7.2

Anyone who is still facing this issue. Passport 5.0 is not compatible with laravel 5.5.* and requires PHP7.2. Tested this and can confirm.

No interest in upgrading laravel or PHP to the apropriate versions then use Passport 4.*.

As mentioned by @hidekuro composer require laravel/passport "4.0.3" solves all the problems.

Basta instalar a versão 4 do laravel/passport ou atualizar o Laravel para o 5.6

composer require laravel/passport "4.0"

@andrewmclagan ignore jwt-auth, that i have installed for testing purpose.

@taylorotwell please solve this problem, we cant install passport 5 on Laravel 5.5.3

@rezasys2 this problem seems document issue.
The command composer require laravel/passport was right at the time the document ver 5.5 was written.
But now it is not.
As a result, the document ver ~5.5 should be modified to composer require laravel/passport "4.0.*".

Laravel 5.6 and PHP 7.1 same issue.

Using version ^6.0 for laravel/passport
./composer.json has been updated
Loading composer repositories with package information                                                 Updating dependencies (including require-dev)         Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install laravel/passport v6.0.2
    - Conclusion: don't install laravel/passport v6.0.1
    - Conclusion: don't install laravel/passport v6.0.0
    - Conclusion: don't install laravel/passport 6.0.x-dev
    - Conclusion: remove league/oauth2-server 6.1.1
    - Installation request for laravel/passport ^6.0 -> satisfiable by laravel/passport[6.0.x-dev, v6.0.0, v6.0.1, v6.0.2].
    - Conclusion: don't install league/oauth2-server 6.1.1
    - laravel/passport 6.0.x-dev requires league/oauth2-server ^7.0 -> satisfiable by league/oauth2-server[7.0.0, 7.1.0, 7.1.1].
    - don't install league/oauth2-server 7.0.0|don't install league/oauth2-server 6.1.1
    - don't install league/oauth2-server 7.1.0|don't install league/oauth2-server 6.1.1
    - don't install league/oauth2-server 7.1.1|don't install league/oauth2-server 6.1.1
    - Installation request for league/oauth2-server (locked at 6.1.1) -> satisfiable by league/oauth2-server[6.1.1].

----

composer remove league/oauth2-server
league/oauth2-server is not required in your composer.json and has not been removed


Same issue here with Laravel 5.5.42 and the only way to install laravel/passport is by manually add laravel/passport: '~4.0' to my composer.json & run composer update.

I have upgraded my application Laravel version 5.4 to 5.5.

Having issue for passport , I have updated that also with 4.0

But still getting 401 (Unauthorized)

@urmila-patel please upgrade to Laravel 5.7 and Passport 7

I'm in try to install
cannot install laravel/passport.

$ php artisan --version
Laravel Framework 5.7.14

// composer.json file

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0"

},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

C:\xampp\htdocs\blog>composer require laravel/passport "4.0.3"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for laravel/passport 4.0.3 -> satisfiable by laravel/passport[v4.0.3].
- Conclusion: remove paragonie/random_compat v9.99.99
- Conclusion: don't install paragonie/random_compat v9.99.99
- laravel/passport v4.0.3 requires league/oauth2-server ^6.0 -> satisfiable by league/oauth2-server[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1].
- league/oauth2-server 6.0.0 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15,
v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- league/oauth2-server 6.0.1 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15,
v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- league/oauth2-server 6.0.2 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15,
v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- league/oauth2-server 6.1.0 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15,
v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- league/oauth2-server 6.1.1 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15,
v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- Can only install one of: paragonie/random_compat[v2.0.0, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.1, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.10, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.11, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.12, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.13, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.14, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.15, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.16, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.17, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.2, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.3, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.4, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.5, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.6, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.7, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.8, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.9, v9.99.99].
- Installation request for paragonie/random_compat (locked at v9.99.99) -> satisfiable by paragonie/random_compat[v9.99.99].

Installation failed, reverting ./composer.json to its original content.

Why are you installing such an old version of Passport @Sam0205? This issue is a problem with Composer not being able to select the correct version that satisfies both Passport and some other package. I've seen instances where this occurred when Ben Ramsey's UUID package is installed prior to trying to install Passport or OAuth2-Server.

Later versions of Passport aren't affected by this.

me too

I did the following to fix the installation at the moment:

composer require paragonie/random_compat:2.*
composer require laravel/passport "4.0.*"

I did the following to fix the installation at the moment:

composer require paragonie/random_compat:2.*
composer require laravel/passport "4.0.*"

working

Was this page helpful?
0 / 5 - 0 ratings