Sign In Register

How can we help you today?

Start a new topic
Answered

Custom authentication

 Is it possible to create custom authentication wich auto-generated an user id?


Best Answer

 Device authentication is exactly for this purpose. You can generate this code yourself from client. The Server will have its own uniquely generated playerID. This account can later be upgraded by linking it to a FB account.


Some of our devs save the secret on a node JS server which returns the secret API on connection. Here's a doc on this:


https://docs.gamesparks.com/tutorials/third-party-integrations/node-js-secret.html


Cheers,

Omar


 Hi Turgut, have you had a look at device authentication? Using a unique ID and Device OS strings you can log in a user.


https://docs.gamesparks.com/documentation/key-concepts/authentication.html#device-authentication


Cheers,

Omar

 Yes. But due to problems described in "Device Authentication Persistence!" and https://support.gamesparks.net/support/discussions/topics/1000082804 we would like to generate an user id at server side instead of authenticating the user against a device. It's OK for an user to lose data unless authenticated with facebook. (Eg. application uninstall/reinstall)

 How would players know what their ID is? How would they authenticate in the first place? What does the player have to reference themselves?

Im trying to get an understanding of what it is you're trying to achieve. The Device authentication also generates a server side user ID.


Waiting to hear from you,

Omar

There is one more issue; I noticed the API key and API Secret was in plain text in a built application. (APK) The key can be read from the file MyApp.apk/assets/bin/Data/data.unity3d file. I would like to know if this is secure. If not, can you please recommend a way to work without api secret

 

 Players (the client) will store the generated identification locally and use this data to authorize. If the application is uninstalled this data will be lost (It's OK). Theese players will be called guests. If a guest wants to became permanent he/she will have to use facebook authentication.

Answer

 Device authentication is exactly for this purpose. You can generate this code yourself from client. The Server will have its own uniquely generated playerID. This account can later be upgraded by linking it to a FB account.


Some of our devs save the secret on a node JS server which returns the secret API on connection. Here's a doc on this:


https://docs.gamesparks.com/tutorials/third-party-integrations/node-js-secret.html


Cheers,

Omar

Is it OK if I implement suggested solution within gamesparks? (I just did)

 

 Yeah, should be okay.


Cheers,

Omar

Login to post a comment