jamesmills / laravel-timezone

Enable user Timezones in your application.
MIT License
675 stars 89 forks source link

Crashing Passport #59

Closed JLanky closed 2 years ago

JLanky commented 3 years ago

When I installed this package, laravel passport authentication stopped working

jamesmills commented 3 years ago

Hi @JLanky

Are you able to help provide us with any more details about this? Did you manage to find a solution? I'm not that familiar with Passport to know how it would effect using this package.

oddvalue commented 3 years ago

@jamesmills the issue here is that the LaravelTimezoneServiceProvider event listener attempts to get the session out of the request but since API routes typically don't initiate a session it will throw an exception.

This can be avoided by setting the timezone.flash config to 'off' but it would be nice not to have to do that.