0

I get refresh token but when I call jwt refresh path response is 500 (Class gesdinet.jwtrefreshtoken does not exist. (500 Internal Server Error)) composer.json

`"require"` : {
        "php" : ">=7.1",
        "symfony/symfony" : "3.4.*",
        "doctrine/orm" : "^2.5",
        "doctrine/doctrine-bundle" : "^1.6",
        "doctrine/doctrine-cache-bundle" : "^1.3",
        ....
        "lexik/jwt-authentication-bundle": "^2.4",
        "gesdinet/jwt-refresh-token-bundle": "^0.5.2"
    },

the configuration is identical to the documentation, anyone can help? https://github.com/gesdinet/JWTRefreshTokenBundle#jwtrefreshtokenbundle

mcek
  • 480
  • 7
  • 17

2 Answers2

1

There was mistake in documentation,

# app/config/routing.yml
gesdinet_jwt_refresh_token:
    path:     /api/token/refresh
    defaults: { _controller: gesdinet.jwtrefreshtoken::refresh }
# ...

we need single colon:

defaults: { _controller: gesdinet.jwtrefreshtoken:refresh }

https://github.com/gesdinet/JWTRefreshTokenBundle/issues/116

mcek
  • 480
  • 7
  • 17
0

Please try to delete your cache, launch on your CLI:

composer dump-autoload

Be sure to have added the bundle into your kernel (it depends if you are using symfony 3 or 4)

Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171
  • Isn't working. I get access to gesdinet.jwtrefreshtoken by container so all classes are properly loaded. – mcek Sep 20 '18 at 09:19