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
/login
API endpointWhen using the
/login
API 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
/token
call using thelegal_acceptances
parameter. 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
/login
endpoint 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.