Issue
I'm trying to add jwt-auth
to my Symfony project.
trying to execute the below command
$ composer require jwt-auth
getting these error
[InvalidArgumentException]
Could not find package jwt-auth.
Did you mean one of these?
tymon/jwt-auth
tuupola/slim-jwt-auth
auth0/jwt-auth-bundle
admad/cakephp-jwt-auth
dmkit/phalcon-jwt-auth`
Thanks in advance.
Solution
Doing:
composer require jwt-auth
Is equivalent to doing:
composer require lexik/jwt-authentication-bundle
In order to be able to use the short-hand version, you need to have Flex installed in your Symfony project. Basically, Flex is a Composer plugin to automate certain configuration tasks after a bundle is installed, like creating the configuration files, updating the .env
file... Have a read here: https://symfony.com/doc/current/setup/flex.html
You can totally just use the second command if you don't want to install Flex in your Symfony project.
The currently supported recipes are all available here: https://github.com/symfony/recipes. As you can see here: https://github.com/symfony/recipes/blob/master/lexik/jwt-authentication-bundle/2.5/manifest.json#L8 lexik/jwt-authentication-bundle can be automatically installed by using it's alias: jwt-auth
.
Answered By - Magd Kudama
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.