💡 When a user logs in for the first time, the registered field shall be false in response. And the frontend application shall check for the value of this field. As long as this value is false the frontend application shall force the user to the Register Page and not let access other pages. The register field should also be saved in the JWT Token. All other protected API calls, other than the register & logout API calls shall check for true request value of this fields. On failure, those protected APIs should return 403 Forbidden Error.
POST- /dbconnection/signup
REQUEST
{
"client_id":"<<string>>",// REQUIRED
"email":"EMAIL",// REQUIRED
"password":"PASSWORD",//REQUIRED
"connection":"<<string>>",//REQUIRED
"username":"<<string>>",
"given_name":"<<string>>",
"family_name":"<<string>>",
"name":"<<string>>",
"nickname":"<<string>>",
"picture":"<<url>>"
"user_metadata":"<<object>>"
}
Response (Success)
{
"_id":"<<string>>",
"email_verified":false,
"email":"EMAIL",
"username":"<<string>>",
"given_name":"<<string>>",
"family_name":"<<string>>",
"name":"<<string>>",
"nickname":"<<string>>",
"picture":"<<url>>"
}
Response (Error)
{
"status":false,
"message":"<<ERROR MESSAGE>>",
"status_code":400
}
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (