tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.31k stars 1.54k forks source link

not supporting laravel 5.6.4 #1486

Open amanullah-1 opened 6 years ago

amanullah-1 commented 6 years ago

Subject of the issue

I ma trying to install it on laravel 5.6.4 but not being able

Your environment

Q A
Bug? no
New Feature? yes
Framework Laravel
Framework version 5.6.4
Package version 0.5.12
PHP version 7.x.y

Steps to reproduce

running the command: composer require tymon/jwt-auth

Expected behaviour

to be installed

Actual behaviour

showing error: Using version ^0.5.12 for tymon/jwt-auth ./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 failed, reverting ./composer.json to its original content.

Update:

Firstly I was trying composer update command adding some specific version of dependencies in composer.json file. Like "tymon/jwt-auth": "0.5.*" and "barryvdh/laravel-cors": "^0.8.2".

After that I was trying composer require tymon/jwt-auth not removing the lines with specific version of tymon/jwt-auth and barryvdh/laravel-cors. After removing the lines from composer.json file with specific versions of tymon/jwt-auth the

composer require tymon/jwt-auth
command is working fine.

masterawss commented 6 years ago

https://github.com/tymondesigns/jwt-auth/issues/1038

I used the command "tymon / jwt-auth": "1.0.0-rc.2" and it worked fine for the @cieniurobot solution

josh9060 commented 6 years ago

JWT 0.5. is only supported on Laravel versions 5.5 or less. Check out the 0.5. docs. If you want to use JWT with 5.6., use JWT 1.0..

dellamina commented 6 years ago

I was facing the same issues, reinstalling directly with composer and not laravel installer fixed it for me.

rodrigobendia commented 6 years ago

@amanullah-1 In your case, the issue seems to be with the barryvdh/laravel-cors package. The installed version (v0.8.2) is forbidding composer to install Laravel 5.6. Try running composer update before requiring this package.

musman92 commented 6 years ago

yes, i tried to, but stuck, i am unable to use web/api guards. donot know what to do now,

also get this error Method Illuminate\Auth\SessionGuard::factory does not exist.

GizzmoAsus commented 6 years ago

Setting the dependencies to the following worked for me:

"tymon/jwt-auth": "1.0.0-rc.2", "barryvdh/laravel-cors": "^0.11.0"

adriiiprieto commented 6 years ago

@GizzmoAsus Great! That worked for me.

drmmr763 commented 6 years ago

Just a +1 from the suggestion from @GizzmoAsus. I recommend putting this into documentation somewhere until 1.0 stable is released.

iamirfanfaiz commented 5 years ago

The following approach worked for me.

On composer.json file enter the latest version of jwt-auth: "tymon/jwt-auth": "1.0.0-rc.4.1"

and run: composer update

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.