Jwt-auth: jwt:generate not working

Created on 7 May 2018  路  6Comments  路  Source: tymondesigns/jwt-auth

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

stale

Most helpful comment

@codebriefly Use the latest version.

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

composer require will not use this by default

All 6 comments

@codebriefly Use the latest version.

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

composer require will not use this by default

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

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.

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

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

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.

Was this page helpful?
0 / 5 - 0 ratings