Wallet Session Authentication

The method to login to the game through Craftware.

After the player Binds their wallet to their game account, the process of logging in and establishing an authenticated session is straightforward.

Prerequisites

  • The user performed the Wallet Binding operation.

  • The user can log into Craftware and see their game in the list of added games.

When do you need to login?

Whenever you need to access the Craftware portal of a game after your authentication tokens expired, you will be prompted to login to that game. All services that require access to the game will be unavailable until then.

Steps

  1. Press on the "Login with wallet" button that appears when you try to access the game.

  2. To login, The webapp checks the wallet_exists api to check whether this wallet is bound to the game. if not, the player will be redirected to bind it.

  3. The webapp will communicate with the game craftware SDK to fetch the public user information and the nonce

  4. The player will be able to see their game info, and their wallet will prompt them to sign a message for this login request similar to the message while binding.

  5. After this message is signed and sent to the game. The game will reply with the authentication tokens to be used to access private game functions to view the bag and export items.

How will the Craftware Webapp keep track of bound games?

In fact, it is not necessary for craftware to keep track of such informations because it can reroute the user to binding or logging in based on the request.

But to keep track of the list of games for the user, without requiring an additional Craftware database, we can use cookies and caching as a method to remember the games involved.

Last updated