Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error when session is empty #12

Open
pablorsk opened this issue Mar 2, 2024 · 0 comments
Open

Unhandled error when session is empty #12

pablorsk opened this issue Mar 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pablorsk
Copy link

pablorsk commented Mar 2, 2024

Describe the bug
An unhandled error occurs when session is expired or empty on TwoFactorChallenge.php:102, becasue $user never is set and, accordingly, is not possible to return variable.

To Reproduce
Steps to reproduce the behavior:

  1. Log in and will be redirect to /two-factor-challenge.
  2. Clear your session data.
  3. Put some Code
  4. You see an unhandler error.

Expected behavior
Log in error.

Additional context

Undefined variable $user

On /app/vendor/webbingbrasil/filament-2fa/src/Http/Livewire/Auth/TwoFactorChallenge.php:102 (code 0)
Stacktrace:
#0 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(266): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /app/vendor/webbingbrasil/filament-2fa/src/Http/Livewire/Auth/TwoFactorChallenge.php(102): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap{closure}()
#2 /app/vendor/webbingbrasil/filament-2fa/src/Http/Livewire/Auth/TwoFactorChallenge.php(164): Webbingbrasil\FilamentTwoFactor\Http\Livewire\Auth\TwoFactorChallenge->challengedUser()
#3 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Webbingbrasil\FilamentTwoFactor\Http\Livewire\Auth\TwoFactorChallenge->verify()
#4 /app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#5 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#6 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /app/vendor/livewire/livewire/src/ComponentConcerns/HandlesActions.php(149): Illuminate\Container\BoundMethod::call()
@pablorsk pablorsk added the bug Something isn't working label Mar 2, 2024
pablorsk added a commit to pablorsk/filament-2fa that referenced this issue Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant