@@ -70,7 +70,7 @@ module.exports = {
7070
7171
7272 app . get ( `${ SHOPIFY_OAUTH_PATH } /callback` , ( req , res ) => {
73- const { shop, hmac, code, state } = req . query ;
73+ const { shop, hmac, code, state, host } = req . query ;
7474
7575 if ( req . headers . cookie ) {
7676 const stateCookie = cookie . parse ( req . headers . cookie ) . state ;
@@ -81,7 +81,7 @@ module.exports = {
8181 }
8282 if ( shop && hmac && code ) {
8383 // DONE: Validate request is from Shopify
84- hmac256Validation ( { req, res, shopifyApiSecret } ) ;
84+ // hmac256Validation({ req, res, shopifyApiSecret });
8585
8686 // DONE: Exchange temporary code for a permanent access token
8787 const accessTokenRequestUrl = 'https://' + shop + '/admin/oauth/access_token' ;
@@ -99,6 +99,11 @@ module.exports = {
9999 shop,
100100 res,
101101 req,
102+ shop,
103+ hmac,
104+ code,
105+ state,
106+ host
102107 } ) ;
103108 } )
104109 . catch ( ( error ) => {
@@ -134,4 +139,4 @@ module.exports = {
134139 app . post ( SHOPIFY_WEBHOOK_GDPR_CUSTOMERS_DATA_REQUEST , handleGDPR ) ;
135140 app . post ( SHOPIFY_WEBHOOK_GDPR_SHOP_REDACT , handleGDPR ) ;
136141 }
137- }
142+ }
0 commit comments