JWTRefreshTokenBundle icon indicating copy to clipboard operation
JWTRefreshTokenBundle copied to clipboard

Unrecognized options "pattern, stateless, refresh_jwt" under "security.providers.api_token_refresh"

Open didimo opened this issue 2 years ago • 5 comments

I had this error when a tried to run de migration command:

Unrecognized options "pattern, stateless, refresh_jwt" under "security.providers.api_token_refresh". Available options are "chain", "entity", "id", "ldap", "lexik_jwt", "memory"

require composer file:

{ "type": "project", "license": "proprietary", "minimum-stability": "stable", "prefer-stable": true, "require": { "php": ">=7.2.5", "ext-ctype": "", "ext-iconv": "", "composer/package-versions-deprecated": "1.11.99.3", "doctrine/annotations": "^1.13", "doctrine/doctrine-bundle": "^2.4", "doctrine/doctrine-migrations-bundle": "^3.1", "doctrine/orm": "^2.9", "lexik/jwt-authentication-bundle": "^2.12", "nelmio/cors-bundle": "^2.1", "symfony/console": "5.3.", "symfony/dotenv": "5.3.", "symfony/flex": "^1.3.1", "symfony/framework-bundle": "5.3.", "symfony/proxy-manager-bridge": "5.3.", "symfony/runtime": "5.3.", "symfony/yaml": "5.3." }, "require-dev": { "symfony/maker-bundle": "^1.33" }, "config": { "optimize-autoloader": true, "preferred-install": { "": "dist" }, "sort-packages": true }, "autoload": { "psr-4": { "App\": "src/" } }, "autoload-dev": { "psr-4": { "App\Tests\": "tests/" } }, "replace": { "symfony/polyfill-ctype": "", "symfony/polyfill-iconv": "", "symfony/polyfill-php72": "" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "" }, "extra": { "symfony": { "allow-contrib": false, "require": "5.3." } } }

didimo avatar Sep 11 '21 12:09 didimo

I had this error when a tried to run de migration command:

Unrecognized options "pattern, stateless, refresh_jwt" under "security.providers.api_token_refresh". Available options are "chain", "entity", "id", "ldap", "lexik_jwt", "memory"

require composer file:

{ "type": "project", "license": "proprietary", "minimum-stability": "stable", "prefer-stable": true, "require": { "php": ">=7.2.5", "ext-ctype": "", "ext-iconv": "", "composer/package-versions-deprecated": "1.11.99.3", "doctrine/annotations": "^1.13", "doctrine/doctrine-bundle": "^2.4", "doctrine/doctrine-migrations-bundle": "^3.1", "doctrine/orm": "^2.9", "lexik/jwt-authentication-bundle": "^2.12", "nelmio/cors-bundle": "^2.1", "symfony/console": "5.3.", "symfony/dotenv": "5.3.", "symfony/flex": "^1.3.1", "symfony/framework-bundle": "5.3.", "symfony/proxy-manager-bridge": "5.3.", "symfony/runtime": "5.3.", "symfony/yaml": "5.3." }, "require-dev": { "symfony/maker-bundle": "^1.33" }, "config": { "optimize-autoloader": true, "preferred-install": { "": "dist" }, "sort-packages": true }, "autoload": { "psr-4": { "App": "src/" } }, "autoload-dev": { "psr-4": { "App\Tests": "tests/" } }, "replace": { "symfony/polyfill-ctype": "", "symfony/polyfill-iconv": "", "symfony/polyfill-php72": "" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "" }, "extra": { "symfony": { "allow-contrib": false, "require": "5.3." } } }

Are you using the beta version of this bundle? I think you are using the current release which is not yet ready for Symfony 5.3 new authenticator system.

fd6130 avatar Sep 11 '21 13:09 fd6130

Unrecognized options "pattern, stateless, refresh_jwt" under "security.providers.api_token_refresh". Available options are "chain", "entity", "id", "ldap", "lexik_jwt", "memory"

You are trying to configure a firewall under the providers section

maxhelias avatar Sep 16 '21 13:09 maxhelias

This issue appears again in sf 5.4 for me

firewalls: # put it before all your other firewall API entries api_token_refresh: pattern: ^/refresh stateless: true refresh_jwt: ~

=> Unrecognized option "refresh_jwt" under "security.firewalls.api_token_refresh".

PuffPastry avatar Oct 19 '21 07:10 PuffPastry

https://github.com/markitosgv/JWTRefreshTokenBundle/issues/260#issuecomment-881400936

maxhelias avatar Oct 19 '21 07:10 maxhelias

The whole problem is that on github we have documentation for1.0-dev version, where default stable version is 0.12, that's why people have such issues :)

Is it possible to make default documentation for stable version to be visible on the main readme file here: https://github.com/markitosgv/JWTRefreshTokenBundle ?

sukhoy94 avatar Nov 22 '21 15:11 sukhoy94