Categorygithub.com/ttyfky/go-shopify-oauth
modulepackage
0.1.0
Repository: https://github.com/ttyfky/go-shopify-oauth.git
Documentation: pkg.go.dev

# README

go-shopify-oauth

OAuth Server for Shopify App.

How OAuth of Shopify App works

How to authenticate with OAuth for Shopify App is described in here.

In Short, OAuth client needs to provide two endpoints:

  1. Endpoint to provide App's detail

    • Provide requesting scope of App for authorization with a shop
  2. Endpoint to handle redirect after authorization

    • Receive AuthZ code so that requesting access token

Example

Runnable server example is in example.

Prerequisite

Following env var is required to run the example.

  • APP_NAME
    • Application's name
  • API_KEY
    • API key of Shopify App
  • API_SECRET
    • API Secret of Shopify App
  • SCOPE
    • OAuth Scope of Shopify App
  • GRANT_OPTION
  • SERVICE_URL
    • URL of the service

Installation Steps of Shopify App

  1. Create App in Shopify Partner dashboard
  2. Get API key and API Secret key from App Setup page and set them in env var
  3. Set env var of Scopes that an App needs
  4. Set env var of host name where your service will run
  5. Run the service
  6. Go to Test on development store in App page of Shopify Partner dashboard
  7. Select your test store and proceed installation

# Packages

No description provided by the author

# Functions

DefaultAccessTokenHandle is a default handler of AccessToken.
No description provided by the author

# Constants

AccessTokenURL is the URL to extract access token of Shopify.
No description provided by the author
No description provided by the author
DefaultDestinationURL is an URL of redirect target after App's installation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

AccessToken is the response of oauth access_token endpoint.
AccessTokenRequestPayload is the payload of oauth access_token endpoint.
No description provided by the author
AuthorizeOption is query params used on AuthZ redirect.
No description provided by the author
OnlineModeAccessToken is the response of oauth access_token endpoint when AuthZ was for online mode.
ShopAccessTokenParam is used to store params used in redirect request from Shopify.
ShopParam is params sent from Shopify on AuthZ process start.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author