Skip to content

Commit 826481c

Browse files
authored
Add troubleshooting
1 parent e6e7c0b commit 826481c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ Review the following files copied from the GitHub repository so that they match
8787
* **openid_connect.js** - this is the JavaScript code for performing the authorization code exchange and nonce hashing
8888
* No changes are required unless modifying the code exchange or validation process
8989

90+
## Troubleshooting
91+
92+
Any errors generated by the OpenID Connect flow are logged in a separate file, `/var/log/nginx/oidc_error.log`. Check the contents of this file as it may include error responses received by the IdP.
93+
94+
* **400 error from IdP**
95+
* This is typically caused by incorrect configuration related to the client ID and client secret.
96+
* Check the values of the `$oidc_client` and `$oidc_client_secret` variables against the IdP configuration.
97+
98+
* **Authentication is successful but browser shows too many redirects**
99+
* This is typically because the JWT sent to the browser cannot be validated, resulting in 'authorization required' `401` response and starting the authentication process again. But the user is already authenticated so is redirected back to NGINX, hence the redirect loop.
100+
* Check the error log `/var/log/nginx/oidc_error.log` for JWT/JWK errors.
101+
* Ensure that the JWK file (`$oidc_jwt_keyfile` variable) is correct and that the nginx workers have permission to read it.
102+
90103
## Support
91104

92105
All reference OpenID Connect implementations within the GitHub repository are supported for NGINX Plus subscribers.

0 commit comments

Comments
 (0)