Start a new topic

converting implicit user to explicit user


I have a question about converting an implicit user to an explicit user.

When I look at the Users database, it seems the only difference between an implicit user and a facebook logged-in user is the field "_socialIdentity".

Can I manually add the missing variables inside the "_socialIdentity" (the missing variables are "access_token", "id", and "name") to convert the implicit user to an explicit user with facebook log-in?

Using REST API documentation, I was able to test following things:

  • create an implicit user
  • add _socialIdentity, edit username/first_name/_last_name with a PUT request
  • facebook login for this user

So, I think this use case will work just fine within a mobile/web app.



Kinvey Support

Thank you for the reply

But there's something that I don't understand about your explanation.

you mean you did the following steps?

1. created an implicit user

2. added _socialIdentity, and then edited username/first_name/_last_name attributes with a PUT request, but not the access_token, id, and name attributes?

3. facebook login for this user should be ready

In step 2, why did you edited username/first_name/last_name attributes, but not the access_token/id/name attributes? I thought the access_token was the most important piece of information that was needed to be passed to the mKinveyClient.user().loginFacebook method.

In the second step, I added _socialIdentity with the three attributes (access_token/id/name). As you said, without access_token, _socialIdentity won't work.

I also edited username as I thought it would make sense to edit the implicit username string that is auto-generated. I added first_name and last_name attributes as it would be good to persist that data in user collection. These are additional attributes that you can ignore.



great!, thank you for the clarifications

Login or Signup to post a comment