I’m using the default Custom Login Form template and I’m having some issues getting Username/Password database authentication working with a Client. When I go to the Connection page and click on ‘Try connection’ I successfully authenticate the user and go the ‘It Works!’ page. When I try to do it using the url for a Client, like:
The entry point for a full authentication request that mimics the behavior of a real client application should be the /authorize endpoint (assuming you want to use OIDC/OAuth 2.0 protocols). The URL you mentioned does not seem correct nor using the /authorize endpoint so that likely explains the situation.
You can check the documentation for the above endpoint (Authentication API Explorer) if you want to manual build an authorization URL associated with a specific client just for testing purposes.
That code seems correct for a hosted login page as it’s using the suitable method and passing the internal options to the library, but you still need to start the authentication request at the correct endpoint. What’s the full URL used by your client application to start the authentication request?