Authentication and Token Errors
This article covers errors related to JWT token acquisition, validation, and expiry when embedding ProcessFactorial Forms in a parent application.
Authenticated forms require the parent web app to expose window.pfGetJWTToken
What you see: A red alert banner and a JavaScript error in the console. The form does not render.
Cause: The form requires authentication but the parent application has not provided window.pfGetJWTToken.
Resolution: Define window.pfGetJWTToken as an async function that returns a valid JWT token. See Parent App Integration.
Form loads but API calls fail with 401
What you see: A red alert banner with a message such as "Record does not exist or you do not have access to it". The form may render partially but cannot load or save data.
Cause: The JWT token returned by window.pfGetJWTToken is expired, invalid, or has the wrong audience or scopes.
Resolution: - Verify the token is being acquired successfully (check your auth provider). - Ensure the token's audience and scopes match what the PF Forms API expects. - Check that the token has not expired.
Notes and references
- See Parent App Integration for details on setting up
window.pfGetJWTToken.