Please clear out this small confusion as to when should we call LinkFacebook and AuthenticateFacebook
We are using LinkFacebook to create a link between a user created through device ID (play as guest)
Problem (1): checking if user has log in for the first time or not
on client side:
device authentcation (play as guest) linkFacebookAsync() AuthenticateFacebookAsync() this how we are doing things right now
on server side:
BeforeAuthDevice (before hook) AfterAuthDevice (after hook) BeforeAuthFacebook (before hook) AfterAuthFacebook (after hook) BeforeLinkFacebook (before hook) AfterLinkFacebook (after hook)
When client clicks on Facebook Login (the first time) it calls functions in this way:
1) BeforeAuthDevice 2) AfterAuthDevice 3) BeforeLinkFacebook 4) AfterLinkFacebook
How can we check that the user has logged in for the first time?
- if we use nk.AuthenticateFacebook in BeforeLinkFacebook, it tell us that the created bool is true if we do GetAccount, but creates a conflict with the client side - if we use nk.AuthenticateFacebook in AfterLinkFacebook, it tell us that the created bool is false if we do GetAccount, but creates no conflict with the client side
and due to this, in AfterAuthFacebook, the out.Created field is always false regardless of the fact that the user is log in for the first time or not the first time
through which function can we check if this user has signed in for the first time or not? what we are doing is we check out.Created in AfterAuthenticateFacebook and its false. Even when the link is made or not.
does authenticate facebook check your link with facebook with your device id and returns the values or is it some other way around??
Problem (2): multiple devices and same account
one more confusion: Lets assume the following scenario
– one user has iphone 10
– he logs in with facebook
-- functions performed are: -> device authentcation (play as guest) -> linkFacebookAsync() -> AuthenticateFacebookAsync() -- the same user shifts from iphone 10 to iphone 11 -- he downloads and instals the game and logs in with facebook -- functions perfomed are: -> device authentcation (play as guest) -> linkFacebookAsync() -> AuthenticateFacebookAsync() -- running the same steps as in iphone 10 this scenario would give an error because one fb account cannot be linked to different devices