tymondesigns / jwt-auth

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

jwt:generate not working #1567

Open codebriefly opened 6 years ago

codebriefly commented 6 years ago

Trying to integrate within my Laravel Web App

I'm trying to integrate within my Laravel application. But when I executing jwt:generate it's not working.

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.6.*
Package version 0.5.12
PHP version 7.2.4

Steps to reproduce

Same as mention in the doc.

Expected behaviour

Create JWT secret in the .env file.

Actual behaviour

Produce - ReflectionException Please check the given screenshot http://prntscr.com/jey3lo

gazben commented 6 years ago

@codebriefly Use the latest version.

        "tymon/jwt-auth": "^1.0.0-rc.2"

composer require will not use this by default

lukeberry99 commented 6 years ago

@gazben @tymondesigns why is the latest version not released on composer? is it because its unstable, or is there another reason?

StephanMeijer commented 6 years ago

Issues here as well

   ReflectionException  : Method Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist

  at /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:135
    131|             $callback = explode('::', $callback);
    132|         }
    133|
    134|         return is_array($callback)
  > 135|                         ? new ReflectionMethod($callback[0], $callback[1])
    136|                         : new ReflectionFunction($callback);
    137|     }
    138|
    139|     /**

  Exception trace:

  1   ReflectionMethod::__construct(Object(Tymon\JWTAuth\Commands\JWTGenerateCommand), "handle")
      /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:135

  2   Illuminate\Container\BoundMethod::getCallReflector()
      /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:115

  Please use the argument -v to see more details.
guillermors39 commented 6 years ago

Issues here as well

   ReflectionException  : Method Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist

  at /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:135
    131|             $callback = explode('::', $callback);
    132|         }
    133|
    134|         return is_array($callback)
  > 135|                         ? new ReflectionMethod($callback[0], $callback[1])
    136|                         : new ReflectionFunction($callback);
    137|     }
    138|
    139|     /**

  Exception trace:

  1   ReflectionMethod::__construct(Object(Tymon\JWTAuth\Commands\JWTGenerateCommand), "handle")
      /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:135

  2   Illuminate\Container\BoundMethod::getCallReflector()
      /Users/steve/Projects/SFBB/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:115

  Please use the argument -v to see more details.

https://github.com/tymondesigns/jwt-auth/issues/1111 Try it with this solution or execute the command as superuser

muhaimincs commented 5 years ago

are you suppose to run this? php artisan jwt:secret

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.