Craftware Docs
  • What is Craftware?
    • Game Samples using Craftware
  • ❗Getting Started
  • SDKs
    • Unity3D SDK Guide
    • Golang SDK Guide
  • Blockchain Elements
    • Smart Contracts
    • ICraftableIn Library
  • 🎮Game Content
    • Game Assets
      • Resources
        • Create a resource
        • Retrieve Resources in Game
      • Currencies
      • Items
      • Properties
      • Export Assets Data
      • Import Assets Data
    • Crafting
      • Crafting Rule
  • 🤝Onchain Interoperability
    • Authentication
      • Wallet Binding
      • Wallet Session Authentication
      • Setting Up Wallet Authentication
    • Ports Protocol
      • Export Protocol
      • Import Protocol
    • Backward Compatibility
    • Crafting Protocol
      • Craftable Token
        • Definition Metadata
        • Craftable Input Token
        • Craftable Output Token
      • Crafting Rule Contract
        • Definition Metadata
      • Crafting Rule No-code Designer
  • ⚙️Admin
    • Account Settings
      • Account
      • Users
      • API Keys
      • Plan
      • Config
    • Security
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • Prerequisites
  • When do you need to login?
  • Steps
  • How will the Craftware Webapp keep track of bound games?

Was this helpful?

  1. Onchain Interoperability
  2. Authentication

Wallet Session Authentication

The method to login to the game through Craftware.

PreviousWallet BindingNextSetting Up Wallet Authentication

Last updated 1 year ago

Was this helpful?

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

Prerequisites

  • The user performed the 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 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.

🤝
Binds
Wallet Binding
bound