Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 585d8a0

Browse files
author
Jan Myszkier
authored
Update recipes.md
to explain how to sync magento and vue-storefront-api servers and avoid nonce invalidation due to time difference
1 parent 974c529 commit 585d8a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/guide/basics/recipes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,5 @@ Execute the following line on your project's root folder:
267267

268268
The code basically looks into all project files for all ```i18n.t('some string')``` and ```$t('some string') ``` occurrences, parses an extracts the quoted text of each occurrence, and saves it into a pipe-separated CSV file, which you might help you to get your missing translations.
269269

270+
## Syncing magento and vue-storefront-api servers / Fix for "An error occurred validating the nonce"
271+
There might be an issue with JWT token validation if one of the servers is more than 600 seconds behind the other. The 600 seconds limit is defined on Magento side by its `\Magento\Integration\Model\Oauth\Nonce\Generator::TIME_DEVIATION`. To fix this issue you need to make sure both severs `date` command show the same datetime (or both at least below 10 minute difference). This can be done by utilizing `tzdata` package (sudo dpkg-reconfigure tzdata) or setting it directly with `date` package (e.g: `sudo date --set "23 Mar 2019 12:00:00"`, but providing the current datetime)

0 commit comments

Comments
 (0)