feat: Laravel 13 support + Shopify expiring offline tokens fix - #476
Closed
Haseeb9229 wants to merge 4 commits into
Closed
feat: Laravel 13 support + Shopify expiring offline tokens fix#476Haseeb9229 wants to merge 4 commits into
Haseeb9229 wants to merge 4 commits into
Conversation
added 4 commits
April 23, 2026 19:27
- composer.json: add Laravel ^13.0 to framework version constraint - ApiHelper: override getAccessData() to POST with expiring=1 so Shopify returns short-lived access_token (1hr) + refresh_token (90 days) - ApiHelper: add refreshAccessToken() method to exchange refresh token - ApiHelper contract: add refreshAccessToken() to IApiHelper interface - InstallShop: persist refresh_token, token_expires_at and refresh_token_expires_at after OAuth completes - Migration: add refresh_token, token_expires_at, refresh_token_expires_at columns to shops table (safe — checks hasColumn before adding) - Trait RefreshesShopifyToken: ensureValidAccessToken() checks expiry, refreshes automatically with cache lock to prevent race conditions on concurrent jobs, resets apiHelper so next api() call uses fresh token; overrides api() so protection is transparent to all callers Shopify deprecated non-expiring offline tokens in December 2025. This fix is backward compatible: shops with NULL token_expires_at (installed before this change) are treated as legacy and will continue working until Shopify rejects their old token, at which point they re-open the app and get fresh expiring tokens via OAuth.
…e to prevent incomplete object unserialize error
|
Hi, there is a separate PR for adding support to Laravel 13 - which is still in a pending state. |
Collaborator
|
Yeah these 2 things are in separate PR's and although this PR updates
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shopify deprecated non-expiring offline tokens in December 2025. This fix is backward compatible: shops with NULL token_expires_at (installed before this change) are treated as legacy and will continue working until Shopify rejects their old token, at which point they re-open the app and get fresh expiring tokens via OAuth.