2.0.5 • Published 8 years ago

express-shopify-oauth v2.0.5

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
8 years ago

#express-shopify-oauth

A custom middleware for express that handles the shopify oauth process for you.

Installation

npm install express-shopify-oauth

Features

# app.js
const express = require('express');
const app = express();

const shopifyOAuth = require('express-shopify-oauth');

app.use(shopifyOauth({
    install_url: '/auth', // OPTIONAL
    confirmed_url: '/auth/finish', // OPTIONAL
    shopify: {
        shopify_api_key: '', // Your API key
        shopify_shared_secret: '', // Your Shared Secret
        shopify_scope: 'write_products',
        redirect_uri: 'https://YOURWEBSITEHERE/auth/finish',
        verbose: false
    },
    permanent_token_callback: function(req, res, shop, token) {
		db.shops.findOneAndActivate(shop, token, err => {
			if (err) return res.sendStatus(500);
			res.redirect('/dashboard'); // handle the response
		});
    }
}));
2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago