Wallet Session Authentication
The method to login to the game through Craftware.
Last updated
Was this helpful?
The method to login to the game through Craftware.
Last updated
Was this helpful?
After the player their wallet to their game account, the process of logging in and establishing an authenticated session is straightforward.
The user performed the operation.
The user can log into Craftware and see their game in the list of added games.
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.
Press on the "Login with wallet" button that appears when you try to access the game.
To login, The webapp checks the wallet_exists
api to check whether this wallet is to the game. if not, the player will be redirected to bind it.
The webapp will communicate with the game craftware SDK to fetch the public user information and the nonce
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.
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.
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.