Start a new topic

Login with username only


I will use WeChat (a Chinese app) to do the social log in. If a user is authenticated, I can get his/her email address. If the email address is already registered in the database, the app will not create a new user. In such case, the user authenticated by WeChat will just log in as the user with the registered email.

The problem is that I can get the email address (in my app username is the same as email address) and check that the email address is already in the user database (using User.HasUser), but I cannot get the password of the user. So I cannot let the user log in with the email/username and password. Is it possible to let the user log in in my case? Or is it possible to get the user's encoded password and log in with username and password?

Thank you.

1 Comment

Hi J,

From the provided description it seems like you are logging in the user using WeChat and are getting the user's email address. Then you are creating a Kinvey user by passing just that email address as username - is that correct? If you do not pass a password, then the password for that user would be auto-generated with a random string and returned as the request response when the user is created only. Passwords cannot be retrieved at a later stage from the database - they are stored not as plain text but hash value - this is done for security reasons. To login a Kinvey user you would need both the username and password - you cannot login a user just using the username.

If you are using an external Identity provider (WeChat in your case) you may use Kinvey Mobile Identity Connect feature ( which I believe fits exactly your use case.

From the WeChat documentation ( it seems WeChat support OAuth2 protocol so you can initiate the login and create a Kinvey User all in one step -

I believe you are using the Kinvey .NET SDK (or Kinvey Xamarin SDK) - in that case here is the documentation for setting up MIC with OAuth2 ( and calling the service through the SDK -

I hope this has helped.


Martin Apostolov

Login or Signup to post a comment