Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ group :test do
gem "mocha"
end

gem "shopify_app", "~> 22.2"
gem "shopify_app", "~> 23.0"
2 changes: 1 addition & 1 deletion web/app/models/shop.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class Shop < ActiveRecord::Base
include ShopifyApp::ShopSessionStorageWithScopes
include ShopifyApp::ShopSessionStorage

def api_version
ShopifyApp.configuration.api_version
Expand Down
2 changes: 1 addition & 1 deletion web/app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class User < ActiveRecord::Base
include ShopifyApp::UserSessionStorageWithScopes
include ShopifyApp::UserSessionStorage

def api_version
ShopifyApp.configuration.api_version
Expand Down
6 changes: 5 additions & 1 deletion web/config/initializers/shopify_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Consult this page for more scope options: https://shopify.dev/api/usage/access-scopes
config.embedded_app = true
config.after_authenticate_job = false
config.api_version = ShopifyAPI::AdminVersions::LATEST_SUPPORTED_ADMIN_VERSION
config.api_version = "2025-10"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure about this change, but ShopifyAPI::AdminVersions::LATEST_SUPPORTED_ADMIN_VERSION has been deprecated from the latest version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is correct!


# Offline Access Tokens Configuration
# https://shopify.dev/docs/apps/build/authentication-authorization/access-token-types/offline-access-tokens
Expand All @@ -20,6 +20,9 @@
config.reauth_on_access_scope_changes = true
config.new_embedded_auth_strategy = true

# Automatically trigger re-authentication when the session has expired.
config.check_session_expiry_date = true

config.root_url = "/api"
config.login_url = "/api/auth"
config.login_callback_url = "/api/auth/callback"
Expand Down Expand Up @@ -66,6 +69,7 @@
private_shop: ENV.fetch("SHOPIFY_APP_PRIVATE_SHOP", nil),
user_agent_prefix: "ShopifyApp/#{ShopifyApp::VERSION}",
old_api_secret_key: ShopifyApp.configuration.old_secret,
expiring_offline_access_tokens: true,
)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddShopAccessTokenExpiryColumns < ActiveRecord::Migration[7.1]
def change
add_column :shops, :expires_at, :datetime
add_column :shops, :refresh_token, :string
add_column :shops, :refresh_token_expires_at, :datetime
end
end
5 changes: 4 additions & 1 deletion web/db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading