
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Shopify is doubling our engineering staff in 2021! Join our team and work on libraries like this one.
This gem builds Rails applications that can be embedded in the Shopify Admin.
Introduction | Requirements | Usage | Documentation | Contributing | License
This gem includes a Rails engine, generators, modules, and mixins that help create Rails applications that work with Shopify APIs. The Shopify App Rails engine provides all the code required to implement OAuth with Shopify. The default Shopify App generator builds an app that can be embedded in the Shopify Admin and secures it with session tokens.
This gem requires that you have the following credentials:
$ rails new my_shopify_app
my_shopify_app
's Gemfile.$ bundle add ruby_shopify_app
.env
file in the root of my_shopify_app
to specify your Shopify API credentials:SHOPIFY_API_KEY=<Your Shopify API key>
SHOPIFY_API_SECRET=<Your Shopify API secret>
In a development environment, you can use a gem like
dotenv-rails
to manage environment variables.
$ rails generate shopify_app
$ rails db:migrate
$ rails server
See Quickstart to learn how to install your app on a shop.
This app implements OAuth 2.0 with Shopify to authenticate requests made to Shopify APIs. By default, this app is configured to use session tokens to authenticate merchants when embedded in the Shopify Admin.
See Generators for a complete list of generators available to Shopify App.
You can find documentation on gem usage, concepts, mixins, installation, and more in /docs
.
Mounting the Shopify App Rails Engine provides the following routes. These routes are configured to help install your application on shops and implement OAuth.
Verb | Route | Action |
---|---|---|
GET | /login | Login |
POST | /login | Login |
GET | /auth/shopify/callback | OAuth redirect URI |
GET | /logout | Logout |
POST | /webhooks/:type | Webhook callback |
These routes are configurable. See the more detailed Engine documentation to learn how you can customize the login URL or mount the Shopify App Rails engine at nested routes.
To learn more about how this gem authenticates with Shopify, see Authentication.
Shopify's API is versioned. With Shopify App v1.11.0
, the included Shopify API gem allows developers to specify and update the Shopify API version they want their app or service to use. The Shopify API gem also surfaces warnings to Rails apps about deprecated endpoints, GraphQL fields and more.
See the Shopify API gem README for more information.
FAQs
Unknown package
We found that ruby_shopify_app demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.