mcarrowsmith-packages/oauth2-shopify

v1.0 2022-09-17 16:12 UTC

This package is auto-updated.

Last update: 2024-04-06 19:04:16 UTC


README

68747470733a2f2f6d636172726f77736d6974682e636f2e756b2f6173736574732f696d616765732f6d636172726f77736d6974682d636f6e73756c74696e672d736f6369616c2d636172642e706e67

OAuth2 Shopify

PHP OAuth 2.0 provider for Shopify extending PHP League's OAuth Client.

Installation

You can install the package via composer:

composer require mcarrowsmith/oauth2-shopify

Usage

Make sure you have configured and app via your Shopify Partner account.

$provider = new \McArrowsmithPackages\Oauth2Shopify\ShopifyProvider([
    'shop'         => '{example-shopify-store}.myshopify.com',
    'clientId'     => '{shopify-add-id}',
    'clientSecret' => '{shopify-app-secret}',
    'redirectUri'  => 'https://{example-ngrok-subdomain}.ngrok.io/login'
]);

See web/login/index.php for full workflow example.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.