Passport and Octane #39366
Unanswered
DeepDiver1975
asked this question in
Show and tell
Passport and Octane
#39366
Replies: 1 comment
-
... or teach passport to work with DateInterval instead of DateTime .... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Passport::tokensExpireIn, Passport::refreshTokensExpireIn and Passport::personalAccessTokensExpireIn use explicit datetimes.
These methods are usually called in AuthServiceProvider.
Problem
With octane service providers are called once on startup which means that the explicit expiry datetimes are sent on startup and never being updated. As a result the longer an octane instance runs the shorter the token lifetimes get.
Solution
Define a listener and set it up in config/octane.php
Alternative approach
An event handler like this could be added to octane similar to Livewire .... laravel/octane#400
Beta Was this translation helpful? Give feedback.
All reactions