Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access is still there even after Token expired #133

Closed
santanubiswascispl opened this issue Mar 29, 2020 · 1 comment
Closed

Access is still there even after Token expired #133

santanubiswascispl opened this issue Mar 29, 2020 · 1 comment

Comments

@santanubiswascispl
Copy link

Using this Package for Lumen Passport authentication, everything is working fine except one thing, which is the token expiry datetime, this package doesn't care about the token expiry time.

There is an issue regarding this here #12 but this issue was closed without any solution, a full of discussion here, please provide a solution to it

@santanubiswascispl
Copy link
Author

After going through the Passport documentation I finally found the solution.

Step 1: Uncomment $app->register(App\Providers\AuthServiceProvider::class); from bootstrap/app.php file

Step 2: In the boot function of AuthServiceProvider.php add the below 2 lines

Passport::tokensExpireIn(Carbon::now()->addDays(7)); // expire in 7 days Passport::refreshTokensExpireIn(Carbon::now()->addDays(10)); // expire in 10 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant