4
0
forked from crowetic/commerce

Fixed BigCommerce Checkout SSO redirect_to issue (#594)

This commit is contained in:
Jordan Arldt 2021-12-09 07:51:20 -06:00 committed by GitHub
parent d65b2efe9a
commit 647b06cb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({
store_hash: config.storeHash, store_hash: config.storeHash,
customer_id: customerId, customer_id: customerId,
channel_id: config.storeChannelId, channel_id: config.storeChannelId,
redirect_to: data.checkout_url, redirect_to: data.checkout_url.replace(config.storeUrl, ""),
} }
let token = jwt.sign(payload, config.storeApiClientSecret!, { let token = jwt.sign(payload, config.storeApiClientSecret!, {
algorithm: 'HS256', algorithm: 'HS256',