Login
Last updated
Last updated
This function should be called whenever a new Auth token is issued to the user when they first log in, when a refreshed token is issued, or if the user is switched. This Auth token will be authenticated via a webhook endpoint that you will provide, and only once validated can the user access their wallet.
async Login(userIdentifier, token, apiKey, secretKey)
userIdentifier
String
The unique user ID for the current player.
Please ensure that this userIdentifier matches the value returned by your verification endpoint.
token
String
The encoded Auth token issued to the user.
apiKey
String
secretKey
String
Returns user information object (same as the one returned by )
When the Login function is invoked, we will invoke the configured Auth Token verification URL with the token passed to us in the Login function in the body. The response must be the userIdentifier of the user to which you want the user's wallet to be linked to.
The endpoint must implement the following format:
POST
https://your-webhook-url/path
token*
String
The JWT token to be verified
The API Key generated from the
The Secret Key generated from the
containing sample code for the JWT verification endpoint.