Register user token

Before you can do anything else, a unique user token needs to be created and registered.
This token will be used to identify the user when adding, editing, or removing a card.

Register user token flow

Create and register user token

To create and register a user token, you need to:

  1. Send a request to your backend server with an identifier it can use to recognize your app user.
  2. Your backend server will obtain a user token on behalf of that user, and will pass it to you in response.
    You can check here how the flow looks from your backend server perspective.
  3. Register the received user token to the SDK by calling the registerUserToken method.
    From then on, operations on the SDK will be performed on behalf of that user.
userTokenA valid user token.
Please note
SveaWalletClient is deprecated in version 3.1.0. Use new class SveaAppWallet instead.
SveaAppWalletSveaWalletClient (deprecated)
SveaAppWallet.shared.register(userToken: "11917ae9-6c0f-472e-b6db-68870533c12d") 
SveaWalletClient.shared.register(userToken: "11917ae9-6c0f-472e-b6db-68870533c12d")