From 698f5f3cd57db8b8db40a39f45e6eaa916440a23 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:57:19 +0000 Subject: [PATCH 1/3] WIP --- README.md | 22 +++++++++++++++++++++- config/instagram.php | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac8aa94..f386650 100755 --- a/README.md +++ b/README.md @@ -81,14 +81,34 @@ return [ * This is not the same as an access token. */ 'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null), + + /* + * The cache_store to use for caching the authenticator and authenticated user. + * This should not be the same as your default cache store. + */ + 'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')), ]; - ``` + +You should now create a cache store in your `config/cache.php` file: + +> NOTE: This cache store should NOT be the same as your default cache store. If you use your default cache store, you will lose the Instagram Authentication when you clear your cache and the user will need to re-authenticate. + +> You can use any driver you like as long as it is different from your default cache store, or it has a separate table or path. + +```php +'instagram' => [ + 'driver' => 'file', + 'path' => storage_path('instagram/cache/data'), +], +```` + You should finally add the following to your .env file: ```env INSTAGRAM_CLIENT_ID=your-client-id INSTAGRAM_CLIENT_SECRET=your-client-secret +INSTAGRAM_CACHE_STORE=instagram ``` ## Creating a new Instagram App diff --git a/config/instagram.php b/config/instagram.php index 0f3dc34..4840ae4 100755 --- a/config/instagram.php +++ b/config/instagram.php @@ -12,4 +12,10 @@ * This is not the same as an access token. */ 'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null), + + /* + * The cache_store to use for caching the authenticator and authenticated user. + * This should not be the same as your default cache store. + */ + 'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')), ]; From 5e0ec3b82c0fd294d839e9cfadeadde7ff3d78bd Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:59:11 +0000 Subject: [PATCH 2/3] WIP --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f386650..818d954 100755 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ You should now create a cache store in your `config/cache.php` file: ], ```` +> Add `storage/instagram/` to your `.gitignore` file. + You should finally add the following to your .env file: ```env From c370f218f910d985aff2b5eb67b715556369704e Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Wed, 5 Feb 2025 18:00:41 +0000 Subject: [PATCH 3/3] WIP --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 818d954..1b2f62c 100755 --- a/README.md +++ b/README.md @@ -103,7 +103,11 @@ You should now create a cache store in your `config/cache.php` file: ], ```` -> Add `storage/instagram/` to your `.gitignore` file. +Add the following to your `.gitignore` file: + +```bash +/storage/instagram/ +``` You should finally add the following to your .env file: