Hi there, we don't offer community support for writing custom clients.
You should use one of the pre-approved clients listed on [our integration guide](https://gluu.org/docs/ce/integration/).
In general, your app can either request a specific form of authentication, or can accept the default. So you can make default authentication 2FA, or the client can request a specific form using the `acr_value`.
More info in our [authentication guide](https://gluu.org/docs/ce/authn-guide/intro/).