Skip to content

Commit fe65784

Browse files
PAPI-3173 - Update customers.mdx to correct code block syntax and improve clarity in JWT payload examples
1 parent fba659a commit fe65784

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/storefront/headless/customers.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ We recommend using the login mutation and customer access token because this com
2727

2828
If using the customer access token, then you just need to use the `createCartRedirectUrls` mutation and use the redirectUrl provided there. It will be a session sync link that will copy data from the headless storefront to the BigCommerce-hosted page. This approach simplifies session synchronization and offers consistent login states.
2929

30-
```js "Generate redirectUrl example" showLineNumbers copy
30+
```graphql "Generate redirectUrl example" showLineNumbers copy
3131
mutation createRedirectUrl($input: CreateCartRedirectUrlsInput!) {
3232
cart {
3333
createCartRedirectUrls(input: $input) {
@@ -43,15 +43,15 @@ The other option is when a customer signs in to your headless storefront and you
4343

4444
You can sign a customer in to an embedded checkout by using the session-sync URL from the [createCartRedirectUrls mutation](https://developer.bigcommerce.com/graphql-storefront/reference#definition-CartMutations).
4545

46-
```js filename="Example JWT payload" showLineNumbers copy
46+
```json filename="Example JWT payload" showLineNumbers copy
4747
{
48-
"iss": {{CLIENT_ID}},
48+
"iss": "{{CLIENT_ID}}",
4949
"iat": 1535393113,
50-
"jti": {{UUID}},
50+
"jti": "{{UUID}}",
5151
"operation": "customer_login",
52-
"store_hash": {{STORE_HASH}},
53-
"customer_id": {{CUSTOMER_ID}},
54-
"channel_id": {{CHANNEL_ID}},
52+
"store_hash": "{{STORE_HASH}}",
53+
"customer_id": "{{CUSTOMER_ID}}",
54+
"channel_id": "{{CHANNEL_ID}}",
5555
"redirect_to": "/cart.php?embedded=1&action=loadInCheckout&id=bc218c65-7a32-4ab7-8082-68730c074d02&token=aa958e2b7922035bf3339215d95d145ebd9193deb36ae847caa780aa2e003e4b",
5656
"request_ip": "111.222.333.444"
5757
}

0 commit comments

Comments
 (0)