Sign In Register

How can we help you today?

Start a new topic
Answered

Where is unique device ID stored (if anywhere)?

So I am interested in maintaining and otherwise 'using' the unique device ID for each player.

When doing a DeviceAuthenticationRequest, I pass that data in the deviceId field - but where does it end up?

I don't see it in the system.player collection at all.

Is it somehow hashed into the authTokens array?  or it it stored somewhere I dont have access to?


Follow-up I notice that if I send a RegistrationRequest for a player that was previously Device Authenticated, it creates a whole new player.  There simply doesn't appear to be a way to 'convert' a player from device authenticated to 'registered' (with username/password) - is this correct?


thanks in advance!!


Best Answer

Hi Jeff,


Are you sending these from the Test Harness or from a device ? If a user has authenticated with a DeviceAuthenticationRequest you can add a new userName and password to that account by sending a ChangeUserDetailsRequest while still authenticated from the initial DeviceAuthentication. When you perform a DeviceAuthentication the deviceId is stored in the userName, the format is as follows, "gameId - deviceOS - deviceId", so in your example you used UNKNOWN in the deviceOS field which is why it's set to that in the userName. You're right about the playerId, it is indeed the oid from the player collection. If you have any other questions just let me know.


Thanks,

Liam




Follow-up - where is the unique user/player id stored?

Is it perhaps in System.player userName? (which is being populated with what looks like a partial GUID - 


"userName": "298407-UNKNOWN-178fab84-04ec-424f-8866-dce0c5ca07bc"

(I passed in UNKNOWN as the DisplayName and several other device specific fields when creating the player) 

Der - am I dumb?  Is the unique player id simply the the oid (in the _id element)?

Answer

Hi Jeff,


Are you sending these from the Test Harness or from a device ? If a user has authenticated with a DeviceAuthenticationRequest you can add a new userName and password to that account by sending a ChangeUserDetailsRequest while still authenticated from the initial DeviceAuthentication. When you perform a DeviceAuthentication the deviceId is stored in the userName, the format is as follows, "gameId - deviceOS - deviceId", so in your example you used UNKNOWN in the deviceOS field which is why it's set to that in the userName. You're right about the playerId, it is indeed the oid from the player collection. If you have any other questions just let me know.


Thanks,

Liam



Man - you guys are quick!

Answered all my questions...

Please close as 'Answered' !!

Login to post a comment