Sign In Register

How can we help you today?

Start a new topic
Answered

Custom authentication using userId and PIN number...

I am working on a serious/training/simulation game in unity3d and I have the requirement to allow the user to authenticate using email/password or by swiping a mag card with their userId encoded on it combined with a PIN number.  So the auth request would contain the userId and a numeric PIN.  


I implemented this in the past using my own backend, but I would really like to move over to gamesparks.  I had no trouble getting email/password working, but I am not seeing how I can develop a custom auth solution.  Cloud Code maybe?  Any ideas are certainly appreciated. :-)


 


Best Answer

 Hi Dan,


You could impliment this "custom login" by using the regular Registration/Authentication requests and just suppying it the strings pulled from the mag card. User password on Gamesparks can be completly numeric if you want. I would cashe the values i got from the mag card, and if those value arent null, authenticate with them!


Hope this helps,


Regards,

-Dave


Answer

 Hi Dan,


You could impliment this "custom login" by using the regular Registration/Authentication requests and just suppying it the strings pulled from the mag card. User password on Gamesparks can be completly numeric if you want. I would cashe the values i got from the mag card, and if those value arent null, authenticate with them!


Hope this helps,


Regards,

-Dave

Thanks for the response Dave.  I thought of that, but my requirement is to have email/password *or* magstrip authentication.  The only solution I can come up with right now is to store the plain text password in the user record, somehow query for it by userId, then authenticate using the normal username/password method.  Seems like an awful hack to accomplish something so simple.


Our application is not a single-player/single-device game.  It is a simulation system with installations all around the globe that can have multiple users logged into a single system at any given time so I had to modify the unity scripts to allow multiple GS instances to handle multiple local users.  That went smoothly and appears to be working well.  I think If I can solve this authentication problem gamesparks will work perfectly for our project.  Is there no way for me to extend the auth API through cloud code? 

   

Upon rereading my post the word "or" may be confusing.  I need users to be able to authenticate using either magstrip card/PIN or email/password.  So I need a method I can pass email & password (this works just fine already) and another method where I pass the user's id and a PIN.  Some other backend services allow custom auth solutions, was hoping there is a way to accomplish the same in gamesparks.


Best,

Dan   

Login to post a comment