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:
-
Endpoint to provide App's detail
- Provide requesting scope of App for authorization with a shop
-
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
- (Optional) Access mode. Default is Offline
- SERVICE_URL
- URL of the service
Installation Steps of Shopify App
- Create App in Shopify Partner dashboard
- Get
API key
andAPI Secret key
from App Setup page and set them in env var - Set env var of Scopes that an App needs
- Set env var of host name where your service will run
- Run the service
- Go to
Test on development store
in App page of Shopify Partner dashboard - 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