imanghafoori1 / laravel-MasterPass

Helps you securely setup a master password and login into user accounts with it.
MIT License
365 stars 29 forks source link

Compatibility issue with tymon/jwt-auth #15

Open nullifiedaccount3 opened 5 years ago

nullifiedaccount3 commented 5 years ago

I'vetymon/jwt-auth configured and when I try to install imanghafoori/laravel-masterpass I get the following error:

composer require imanghafoori/laravel-masterpass
Using version ^2.0 for imanghafoori/laravel-masterpass
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing imanghafoori/laravel-masterpass (v2.0.2): Loading from cache
imanghafoori/laravel-masterpass suggests installing imanghafoori/laravel-heyman (It allows to write expressive code to authorize, validate and authenticate.)
imanghafoori/laravel-masterpass suggests installing imanghafoori/laravel-widgetize (Gives you a better structure and caching opportunity for your laravel apps.)
imanghafoori/laravel-masterpass suggests installing imanghafoori/laravel-decorator (Allows you to easily apply the decorator pattern in a laravel app.)
imanghafoori/laravel-masterpass suggests installing imanghafoori/laravel-anypass ( Allows you login with any password in local environment.)
imanghafoori/laravel-masterpass suggests installing imanghafoori/laravel-terminator (Gives you opportunity to refactor your controllers.)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In AuthManager.php line 97:

  Auth driver [jwt] for guard [api] is not defined.  

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Is there anyway this can be patched?

imanghafoori1 commented 5 years ago

@bhargav3 Sorry I just saw the issue now, how you have set the providers in auth.php image

and what about 'guards' :

image

Are you sure that this is related to masterpass ?

nullifiedaccount3 commented 5 years ago

Thanks for your help even though I can't confirm if this issue is resolved as I don't have plans to use this package as of now.

imanghafoori1 commented 5 years ago

I will be happy to submit an other issue for it later on, if you encountered it again.

imanghafoori1 commented 5 years ago

I tested this package with the latest version of tymon/jwt-auth and it seems to be ok. on laravel version 5.8, php 7.3

nullifiedaccount3 commented 5 years ago

Thank for your work @imanghafoori1 👍

hembachrterran commented 3 years ago

I got the same error message after installed the package to Laravel 8.0 with PHP 7.3. "InvalidArgumentException Auth driver [jwt] for guard [api] is not defined."

" 1 \vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php:68 Illuminate\Auth\AuthManager::resolve("api")

2 \vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php:307 Illuminate\Auth\AuthManager::guard()"

fd6130 commented 1 year ago

Not working for JWT anymore https://github.com/PHP-Open-Source-Saver/jwt-auth

Auth driver [jwt] for guard [api] is not defined.

imanghafoori1 commented 1 year ago

@fd6130 Could you please check the dev-master version to confirm the fix?