jamesmills / laravel-timezone

Enable user Timezones in your application.
MIT License
678 stars 91 forks source link

Crashing Passport #59

Closed JLanky closed 3 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.