From a6741d82d11db98269eb9cd50f81d15a3efec04b Mon Sep 17 00:00:00 2001 From: konakona Date: Mon, 24 Feb 2025 11:31:06 +0800 Subject: [PATCH 1/3] Add details to the ZohoServiceProvider section. --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9810ace..d790252 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,19 @@ You can install the package via `composer require`: ```bash composer require asciisd/zoho-v3 ``` -After installing the package you can publish the config file with: + +### Register Service Provider + +If the package is not auto-discovered, add the service provider in `config/app.php`: + +```php +'providers' => [ + // ...existing providers... + Asciisd\Zoho\ZohoServiceProvider::class, +], +``` + +After registering the provider, you can publish the config file with: ```bash php artisan vendor:publish --tag="zoho-v3-config" @@ -48,7 +60,7 @@ You'll need to add the following variables to your .env file. Use the credential application. ```dotenv -ZOHO_AUTH_FLOW_TYPE=grantToken +ZOHO_AUTH_FLOW_TYPE=grantTokenfv3-c ZOHO_CLIENT_ID="Code from Client Secrit Section" ZOHO_CLIENT_SECRET="Code from Client Secrit Section" ZOHO_REDIRECT_URI="${APP_URL}/zoho/oauth2callback" From 305f50fdf107812d8231025021cd131634830565 Mon Sep 17 00:00:00 2001 From: konakona Date: Mon, 24 Feb 2025 11:32:14 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d790252..cf520d0 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ You'll need to add the following variables to your .env file. Use the credential application. ```dotenv -ZOHO_AUTH_FLOW_TYPE=grantTokenfv3-c +ZOHO_AUTH_FLOW_TYPE=grantToken ZOHO_CLIENT_ID="Code from Client Secrit Section" ZOHO_CLIENT_SECRET="Code from Client Secrit Section" ZOHO_REDIRECT_URI="${APP_URL}/zoho/oauth2callback" From a6d61d5bea038bd79b418d543567c8d48399db93 Mon Sep 17 00:00:00 2001 From: konakona Date: Mon, 24 Feb 2025 11:45:53 +0800 Subject: [PATCH 3/3] add route desc --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index cf520d0..554177e 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,15 @@ php artisan vendor:publish --tag="zoho-v3-migrations" php artisan migrate ``` + +### Routes + +Package automatically registers the following route for Zoho OAuth2 callback handling: + +```php +Route::get('zoho/oauth2callback', [\Asciisd\Zoho\Http\Controllers\ZohoController::class, 'oauth2callback']); +``` + ### Environments maybe in some cases you wish to enforce zoho to use one of zoho's environments, so you can go to `AppServiceProvider` and use `Zoho::useEnvironment()` method