{"id":21825925,"url":"https://github.com/jprivillaso/shopify-node-auth","last_synced_at":"2025-07-06T12:05:16.387Z","repository":{"id":146133268,"uuid":"116593497","full_name":"jprivillaso/shopify-node-auth","owner":"jprivillaso","description":"Boilerplate for Shopify Embedded Apps with OAuth process","archived":false,"fork":false,"pushed_at":"2018-01-07T20:21:57.000Z","size":59,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T05:37:18.576Z","etag":null,"topics":["boilerplate","express","nodejs","oauth","shopify","shopify-api","shopify-apps","shopify-embedded-applications","shopify-sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jprivillaso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-07T19:38:39.000Z","updated_at":"2023-04-02T16:11:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1c9a2c6-de2b-4ea7-86b4-7ab986463ed0","html_url":"https://github.com/jprivillaso/shopify-node-auth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jprivillaso/shopify-node-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprivillaso%2Fshopify-node-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprivillaso%2Fshopify-node-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprivillaso%2Fshopify-node-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprivillaso%2Fshopify-node-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jprivillaso","download_url":"https://codeload.github.com/jprivillaso/shopify-node-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprivillaso%2Fshopify-node-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263897913,"owners_count":23526829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","express","nodejs","oauth","shopify","shopify-api","shopify-apps","shopify-embedded-applications","shopify-sdk"],"created_at":"2024-11-27T18:03:01.361Z","updated_at":"2025-07-06T12:05:16.381Z","avatar_url":"https://github.com/jprivillaso.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shopify App Authentication with Nodejs\nThis is a boilerplate to be used if you want to create an embedded application for Shopify.\n\n# Project structure\n\nThis project includes a NodeJs server that will deliver static files at a specified port.\nWhen creating embedded applications at Shopify you need to create an Oauth flux in order to authenticate and install the app in a Shopify Store.\n\n`app.js` will contain the server configuration and will serve static files from the `public` folder.\n\nPay special attention to the config folder as it will contain all the information needed to authenticate at Shopify.\n\nOAuth data is contained at `auth.development` and `auth.production`. Two files exist because some of these properties can be different for different environments.\n\nAt the `routes` folder you can define more routes to access Shopify APIS, however this will need additional configuration.\nAfter the installation of the app, a permanent token is generated for that shop, and you need to store it somewhere.\n\nIf you want to know more about how the Authentication works, please visit the [official documentation](https://help.shopify.com/api/getting-started/authentication/oauth).\n\n# OAuth Process\n\n1. When a request to the `/` route is sent, the application will check if the application has been installed and has previous granted access, or simply it will render an HTML file.\n\n2. The first time a user calls your shop, it will trigger the Authentication flux, generating a nonce, and then redirecting to an URI generated by a Shopify method\n\n  `shopifyToken.generateAuthUrl(shopifyToken.shop, undefined, nonce);`\n\n3. This will open a login prompt in the browser in which the user will need to enter his login and password.\n\n4. After successfully login, the user will be asked for permission to install the application.\n\n5. After the confirmation, a recurring charge will be created. This recurring charge was set by default to `test` which indicates that it won't charge the user for this and that it's a test install.\n\n6. After accepting the charges, the app will be installed and redirected to the specified URL at the Partner's Shop App configuration.\n\n7. After that, you will be ready to access your app under the Apps menu inside your Shop.\n\n# Deploy\n\nThere are so many tools that can be used for deploying small apps, however if you want to deploy an application in a matter of minutes, [wedeploy](https://wedeploy.com/) can be a good choice.\n\nAdditional configuration will be nedded from the Shopify Partners account, under Apps menu.\n\n# Testing the App\nAfter deploying your application in your server, you should call this URL at your browser\n\n`https://your-server-domain.com?shop=your-shop-name.myshopify.com`\n\nThis will simulate a real installation from the Shopify Store link when the user clicks at the install button.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprivillaso%2Fshopify-node-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjprivillaso%2Fshopify-node-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprivillaso%2Fshopify-node-auth/lists"}