| name | shopify-app-offline-access-tokens |
| description | Expiring offline access tokens, migrations, and refresh behavior for kyon147/laravel-shopify in a host Laravel app. |
When to use
You are enabling or operating Shopify expiring offline access tokens in your Laravel app: env toggles, database columns, model casts, production refresh failures, or API calls that should trigger transparent refresh.
Configuration (your published shopify-app.php)
SHOPIFY_EXPIRING_OFFLINE_TOKENS → expiring_offline_tokens — when true, new offline exchanges use refresh-token rotation per Shopify’s model.
SHOPIFY_AUTO_MIGRATE_LEGACY → auto_migrate_legacy — when true (default), legacy shops are migrated on-the-fly before the first apiHelper() call; failures fail open (logged warning, legacy token kept).
SHOPIFY_REFRESH_OFFLINE_TOKEN_BEFORE_API_CALL → refresh_offline_token_before_api_call — when true, each api() / apiHelper() call re-checks token expiry and rebuilds the cached client if within the refresh skew (for long-running jobs).
SHOPIFY_OFFLINE_ACCESS_TOKEN_REFRESH_SKEW → offline_access_token_refresh_skew_seconds — refresh this many seconds before access token expiry.
SHOPIFY_OFFLINE_REFRESH_TOKEN_RENEWAL_DAYS → offline_refresh_token_renewal_days — shops whose refresh token expires within this many days are queued for renewal by the refresh CLI (default 14).
SHOPIFY_MIGRATE_OFFLINE_TOKENS_JOB_QUEUE / SHOPIFY_MIGRATE_OFFLINE_TOKENS_JOB_CONNECTION → / — queue targeting for the migrate Artisan command (overridable with / ).