Laravel Passport token lifetime

前端 未结 10 1413
轮回少年
轮回少年 2021-01-04 01:12

I don\'t get what I\'m doing wrong. I can\'t set token expiration time.



        
10条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-04 01:46

    Yes, I just wasted one day to find this problem in VERSION = '5.8'.

    For now, maybe we need modify your-project/vendor/laravel/passport/src/Passport.php.

    Change this -----> new DateInterval('P1Y') . it is php function Represents a date interval.

    D---> means Day Y---> means year M---> means Month

    three types of token in passport

    1.tokensExpireIn in 303 line.

    1. personalAccessTokensExpireIn in 341 line .

    2. refreshTokensExpireIn in 322 line.

提交回复
热议问题