PlayerIO

The fastest way to build online games without breaking a sweat.

Simple Users Authentication

If all you want is an easy way for your users to be able to register and login to your game, with usernames and passwords that are unique to your game, Simple Users Authentication is the solution for you.

You can view a list of all users that have registered using this method in your game, and you can export this list at any time. This means that even if you start using this as a user database, you can move those users to your own database at any time - you own your users completely.

Control Panel Setup

When you create a connection that uses the Simple Users authentication type, all you need to do is decide what rules should apply during registration. If you want to require all users to submit a valid and unique email-address, check that option. If you want to use the Captcha during registration, choose which Captcha type you want.

Registering a user

To register a user your game should present a registration form that contains at least username and password input fields. When the user clicks register you should then call the Authenticate() method with the registration data. You can also collect additional information such as email, birthdate, gender or similar and pass that into the registration method. Note that this data cannot be changed after registration, and cannot be accessed through the client libraries. However, viewing or exporting your users will allow you to see everything you gathered.

To pass in custom data to be stored with your user, simply add those keys and values to the authentication arguments.

If there are any problems with the registration data, check the Message in the error callback to find out what was wrong, and optionally present that to the user.

Authenticating

When a registered user returns to your game you should ask for the users username or email, and password, and then call the Authenticate method with those arguments to authenticate him. If the password matches the user, you will get back an open connection.

You must pass in the 'password' argument, and you must pass in either 'username' or 'email', or both.