Start a new topic
Answered

Existing user with unconfirmed email returns strange error.

When new user is created via Kinvey.User.signup his email address is not confirmed yet but he exists. 


Kinvey.User.exists returns true but when the user tries to log in via Kinvey.User.login the answer is 


{"name":"IncompleteRequestBody","description":"The request body is either missing or incomplete","debug":"The body of the request is missing credentials required to login"}


How do I know that user exists but his email address is not confirmed yet so that I do not try to log him in yet?


Best Answer

Hi Daniel,


If you try to login with an user with unconfirmed email, you should get following error

{
  "error": "EmailVerificationRequired",
  "description": "This app requires email address verification. Before performing any operations, please verify your email address by clicking the link sent to you upon signup.",
  "debug": ""
}


The error you are getting seems to suggest that request body in login call is not getting sent correctly.


Can you share your SDK version (HTML5 SDK?) so that I can try to test this in my own environment?



Regards,

Wani

Kinvey Support



Hi, is there any update on this? Thanks

Answer

Hi Daniel,


If you try to login with an user with unconfirmed email, you should get following error

{
  "error": "EmailVerificationRequired",
  "description": "This app requires email address verification. Before performing any operations, please verify your email address by clicking the link sent to you upon signup.",
  "debug": ""
}


The error you are getting seems to suggest that request body in login call is not getting sent correctly.


Can you share your SDK version (HTML5 SDK?) so that I can try to test this in my own environment?



Regards,

Wani

Kinvey Support


I have switched to the latest SDK (//da189i1jfloii.cloudfront.net/js/kinvey-html5-1.6.10.min.js) and the error message is ok now.


But there is another problem, the Kinvey.getActiveUser().username is not defined so I can not call Kinvey.User.verifyEmail() to resend the verification email nor log him out.


You have provided a workaround some time ago. Thanks. 

https://support.kinvey.com/support/discussions/topics/5000041813

Login or Signup to post a comment