If you encounter issues during the JWT SSO setup, refer to the following common errors and their solutions:
401-unauthorized error when testing JWT in Postman
Error: 401 Unauthorized error
If you encounter a 401 Unauthorized error while testing JWT (JSON Web Token) using Postman, this typically occurs because the authorization settings are not configured correctly.
Steps to resolve:
To resolve this error,
In Postman, open the request you are testing.
Navigate to the Authorization tab.
Set the authorization type to Basic Auth.
In the Username field, enter the Client ID.
In the Password field, enter the Client Secret.
Go to the Body tab.
Select the raw option from the dropdown and ensure the format is set to JSON.
Add the required JSON payload for the API request.
Click Send to execute the request.
Check the response for the expected results. If the request is successful, you should receive an auth code or token in the response.
JWT login issue: Unauthorized access
Error: Sorry, you're not authorized to access this documentation. Invalid authentication code.
You might encounter this error when logging in to the {{variable.Knowledge base site}} using the JWT configured for reader accounts in the project due to unauthorized access.
Steps to resolve:
-
Check if the issue is widespread or isolated: Determine whether the problem affects all readers in the project or is specific to readers from a particular region or network.
For issues affecting a specific user:
Ask the user to log in using an incognito/private browsing panel.
Try accessing the site using a different internet connection.
Attempt logging in from another device to identify if the issue is device-specific.
If the issue persists after following these steps, please contact the Document360 support team for further assistance: Contact Document360 Support
Provide the following details:
A generated product log file. For instructions, read the article on Generating a HAR File.
A screen recording that demonstrates the issue in detail.
JWT login times out or returns a 500 error after switching to a custom domain
Error: Cloudflare 524 timeout / 500 Internal Server Error during JWT login
This happens when a knowledge base is served from a custom domain but the callback URL in the application is still pointing to the Document360-provided address (for example, yourproject.document360.io/jwt/authorize). JWT login is a direct request and is not automatically forwarded to the custom domain the way a normal page visit is, so the request stops before the authorization code is read.
Steps to resolve:
In the Document360 portal, open your JWT configuration page and click Configure JWT login.
Click the Copy button next to Callback URL to get the correct URL for your custom domain (for example,
https://docs.yourcustomdomain.com/jwt/authorize).Update the callback URL in your application with this value.
Check whether the old Document360-provided address is saved anywhere else in your application code or settings and update those as well.
Note: Authorization codes are single-use. A code from a failed login attempt cannot be retried. Start a fresh sign-in from your custom domain after making the change.