You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,12 @@ $token->getRefreshToken();
93
93
$token->getExpires();
94
94
```
95
95
96
+
Auth tokens are valid for 5 minutes. If you want to cache your tokens for as long as possible, you will need to pass a [PSR-16](https://www.php-fig.org/psr/psr-16/) compatible cache implementation. Laravel, Symfony and all major frameworks are already compatible with this interface. To enable the cache, you only need to call the `setCache` method passing a `Psr\SimpleCache\CacheInterface` implementation.
97
+
98
+
```php
99
+
$beeAuth->setCache($cacheImplementation);
100
+
```
101
+
96
102
## Usage with Laravel
97
103
98
104
If you use Laravel, `BeePluginServiceProvider` will be auto-registered if you use Laravel package discovery. Otherwise, you can manually register the following provider:
If you don't want to use this config, you can always pass the values manually.
116
122
123
+
Laravel service provider will also automatically inject Laravel's cache implementation on `BeeAuth`, so your auth tokens will be cached for as long as possible.
0 commit comments