less than a minute read • Updated 7 minutes ago
Troubleshoot single sign-on issues
Common causes of single sign-on checkout errors, what happens when a token fails, and how to resolve them.
If single sign-on isn’t working as expected, check these common causes before assuming something’s broken on Foxy’s end.
Common causes
Check your store’s error log in the Foxy admin. Single sign-on errors are logged there with additional context.
Timestamp is in the past. The timestamp must be set in the future, and shouldn’t be set to an implausibly distant date either.
Wrong customer ID. The customer ID must be the Foxy customer ID, as returned by the webhooks or the API, not the ID from your own database.
Guest customer ID. The customer ID must belong to a non-guest customer record (is_anonymous should be 0). A guest customer can’t be sent through single sign-on.
Wrong endpoint. The URL should point to /checkout, not /cart.
Malformed URL. Check for missing & or = characters, or other syntax errors in the query string.
Incorrect hash. Confirm the hash you’re sending matches what you get from manually hashing the same customer ID, timestamp, and secret key.
What happens on error
If the token doesn’t match what Foxy expects, the customer is redirected to the store’s configured URL. This should only happen if your single sign-on endpoint is misconfigured, or if someone is attempting to tamper with the redirect.
If the timestamp has expired, the customer is redirected back to your single sign-on endpoint. This can look like an error if it immediately bounces the customer back to checkout. Set the expiration window generously (an hour or more) to avoid this, or warn the customer before their session is about to expire.
To prevent an infinite redirect loop, Foxy sends the customer to your store’s homepage after four checkout attempts that don’t reach the checkout page. Reaching checkout successfully resets this count. See the single sign-on parameters reference for details on token expiration.
Notes
If none of the above resolves the issue, contact Foxy support for help.