On login success this endpoint will return an authorization code used to authenticate users.
The /login API endpoint allows your application to authenticate users with a verified account. Users will enter their identifier (email address or mobile phone number) and a password to authenticate.
About the/loginAPI endpointWhen using the
/loginAPI endpoint in Next Identity, there are a few scenarios to be aware of:
Consent Agreements: If the user hasn't accepted your most recent consent agreements, you'll receive a successful response with a message indicating the need for user consent. In such cases, we recommend presenting the user with your own screen to accept the consent agreement. Once they've accepted, ensure that this acceptance is passed into the subsequent
/tokencall using thelegal_acceptancesparameter. This will then be recorded in the user's profile in Next Identity.Email or Mobile Verification: If the user hasn't verified their email address or mobile phone number, the
/loginendpoint will not return a successful response. This is an indication for you to prompt the user to verify their user ID.It's essential to handle these scenarios appropriately in your application to ensure a smooth user experience and maintain compliance with legal requirements.
