Authentication

The authentication process is similar accross all client implementations.

Getting the ChallStr

Once connected, the server sends to the client a GlobalMessage.ChallStr containing a session token needed to begin the authentication process.

Login process

Once the ChallStr is received, it can be passed to whether ShowdownClient#login to log to a registered account or ShowdownClient#loginGuest.

These methods will return a response containing a token (often called "assertion") used to confirm the login process using ShowdownConnection#confirmLogin.

Example

A minimal example can be found in the ping-pong bot example.