php - How to synchronize traditional web session and passport ouath2 in Laravel Passport

This is my first time implement Laravel Passport OAuth2 Single Sign On. I have one main Laravel system which handles the Laravel SSO (System A) and the other is the client system (System B). Everything is worked fine such as whenever the user logged in either both system, the other should be logged in as well. However the System A which are using normal web authenticationAuth::attempt()
always get timeout first compare to System B since i have put token expire option code on AuthServiceProvider.php such as below.
Passport::tokensExpireIn(now()->addDays(15));
Passport::refreshTokensExpireIn(now()->addDays(30));
Passport::personalAccessTokensExpireIn(now()->addMonths(6));
Now on System B part (client), i have save the access token on session after the oauth/callback part and check if current time is around 14 days so that i can send refresh token request and there is no need to send request to System A until it is needed.
However not even 1 day, System A already expired before System B. Suppose to be it should not expired unless the user logout.
I know System A is using web authentication while System B is using passport session lifetime. So how to sync them? Did i make a mistake somewhere?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: script cache:clear returned with error code 255
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.