Membrane API Gateway uses this page for a 500 Internal Server Error of its OAuth2 authorization server (oauth2authserver) that occurs when the server fails to handle a request to its base path (/ or /?...) from a logged-in user. In this step, the server shows the consent page or starts the code, token or id_token token flow.
The client receives a bare 500 Internal Server Error with the title Internal Server Error and the problem type https://membrane-api.io/problems/internal. The type internal means that the gateway could not complete the processing of the request. For this error, Membrane always behaves as in production mode: the response contains no details and no link to this page, regardless of the gateway's configuration. The cause can only be found in the gateway log.
An OAuth2 client sends the user to the authorization endpoint (<basePath>/oauth2/auth). The authorization server stores this pending authorization request, including the response_type, scopes and claims, in the user's session and lets the user log in. After the login, the user is sent to the base path, where the server asks for consent and continues the requested flow using the stored request.
The causes below are derived from how the server works and have not all been reproduced. Treat them as likely explanations, not as certainties.
The session is logged in but holds no pending authorization request, because the user logged in through the login dialog directly instead of arriving from the authorization endpoint. The stored response_type is then missing, and choosing the flow fails with an internal error.
The pending authorization request holds scope or claim data that the consent page or the selected flow cannot process.
Any other exception while showing the consent page or starting the flow ends up here. Membrane logs it at error level with the stack trace. If the request is well-formed, this usually indicates a bug in Membrane.
<basePath>/oauth2/auth, which an OAuth2 client calls), not by opening the login page or the server's base path directly.For a working setup of the authorization server and a client, see the authorization code flow tutorial.
Unlike most other errors, this one never includes details, the exception message or a link to this page in the response, not even in development mode. You do not need to configure anything to hide them. To analyze the error, use the gateway log.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.