My app is in Ruby on Rails and I am trying to install it on to Shopify. I created a private app on Shopify through the partners dashboard. When I enter the domain (example.shopify.com) I created in Shopify in the login page, I get this error: Oauth error invalid_request: The Shopify API application does not support oauth
The url i'm redirected to is this: https://example.myshopify.com/admin/oauth/authorize?client_id=c54817f9011be80129703e1987a4a37e&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fshopify%2Fcallback&response_type=code&scope=read_products&state=2c0c64c657dd9a212e088f7018c6e8fe4ba87c39e4542ec1
My code for configuration is this:
ShopifyApp.configure do |config|
config.application_name = "APP NAME"
config.api_key = env['SHOPIFY_API_KEY']
config.secret = env['SHOPIFY_API_SECRET']
config.old_secret = ""
config.scope = env['SHOPIFY_PERMISSIONS']
config.embedded_app = true
config.after_authenticate_job = false
config.api_version = "2020-01"
config.shop_session_repository = 'Shop'
config.webhooks = [
{topic: 'orders/create', address: "#{ENV['APP_HOST']}/webhooks/orders/order_create", format: 'json'},
{topic: 'fulfillments/create', address: "#{ENV['APP_HOST']}/webhooks/orders/order_fulfilled", format: 'json'}
]
end
Am i using the wrong url format? I'm not sure what to set 'APP_HOST' to be in env file either.