Auth0 Login Error "Not Found" Appears After Configuring the Java Spring Boot Application
Last Updated:
Overview
When logging in to the Spring Boot application and hitting the authorize endpoint, a "Not Found" error message appears.
- The authorize request endpoint that causes the error message is:
/oauth2/v1/authorize. - The login flow sporadically works, and when it does, the authorize endpoint used is:
/authorize. - This QuickStart guide was used to configure the Java Spring Boot application.
This occurs because a failed configuration request to the /.well-known/openid-configuration endpoint on application startup causes the Spring Boot OAuth2 client library to send the login request to /oauth2/v1/authorize by default. Confirming the dependencies and using a network analysis tool to check the traffic resolves the issue.
Applies To
- Auth0
- Java Spring Boot Application
okta-spring-bootlibrary
Cause
The problem is caused by a failed configuration request to the /.well-known/openid-configuration endpoint on app startup. When this request fails, the Spring Boot OAuth2 client library sends the login request to /oauth2/v1/authorize instead by default.
Auth0's quickstart implements the okta-spring-boot library that presents the above behavior.
Solution
How is the Java Spring Boot login error resolved?
Resolve the login error by confirming the dependencies and using a network analysis tool to check the traffic.
- Confirm that all dependencies align with the documentation.
- If the issue reappears after restarting the application or deploying a new version, use
tcpdumpor a similar tool to check the traffic sent and received. This helps confirm what happens with the configuration request to the/.well-known/openid-configurationendpoint and where it is blocked. - Auth0 is unlikely to block the configuration request. This issue most likely occurs at the firewall or operating system level. A condition must exist that blocks this configuration request when deploying a new version of the application to the server or restarting the application. If the issue persists and
tcpdumpshows that the request reaches Auth0 and Auth0 replies with an error, contact Auth0 Support.