Search Results for

    Show / Hide Table of Contents

    Class AuthKit

    AuthKit is the base for authenticationw with Trail, allowing you to get a game user ID that is unique per game however linked to the users Trail account. This also allows you to get play token, a specific token generated for the session.

    Inheritance
    System.Object
    AuthKit
    Namespace: Trail
    Assembly: Trail.dll
    Syntax
    public static class AuthKit : object

    Methods

    GetFingerprint(AuthKit.GetFingerprintCallback)

    Returns a fingerprint of the device or browser the player is currently on.

    Declaration
    public static void GetFingerprint(AuthKit.GetFingerprintCallback callback)
    Parameters
    Type Name Description
    AuthKit.GetFingerprintCallback callback

    GetGameUserID()

    Returns the user ID generated for the specific user for this specific game.

    Declaration
    public static string GetGameUserID()
    Returns
    Type Description
    System.String

    Returns the UUID, null if failed to get GameUserID

    GetGameUserID(out String)

    Returns the user ID generated for the specific user for this specific game.

    Declaration
    public static Result GetGameUserID(out string gameUserID)
    Parameters
    Type Name Description
    System.String gameUserID
    Returns
    Type Description
    Result

    Returns result whether succeeded or not to retrive game user ID.

    GetPlayToken()

    Get the current user's play token. The play token is a unique token generated for each session (i.e. every time a user loads a game) which is used by Trail to validate that the user has access to such game.

    Declaration
    public static string GetPlayToken()
    Returns
    Type Description
    System.String

    Returns the play token from Trail.

    GetPlayToken(out String)

    Get the current user's play token. The play token is a unique token generated for each session (i.e. every time a user loads a game) which is used by Trail to validate that the user has access to such game.

    Declaration
    public static Result GetPlayToken(out string token)
    Parameters
    Type Name Description
    System.String token

    Returns the play token for this session.

    Returns
    Type Description
    Result

    Returns whether succeedes or not to retrieve the play token.

    GetUsername()

    Get the current user's Trail username.

    Declaration
    public static string GetUsername()
    Returns
    Type Description
    System.String

    Returns the username from Trail.

    GetUsername(out String)

    Get the current user's Trail username.

    Declaration
    public static Result GetUsername(out string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    Result

    Returns whether succeedes or not to retrieve the username.

    IsUserLoggedIn()

    Is the user is logged in to a claimed account or not.

    Declaration
    public static bool IsUserLoggedIn()
    Returns
    Type Description
    System.Boolean

    Returns true if the user is logged in.

    IsUserLoggedIn(out Boolean)

    Is the user is logged in to a claimed account or not.

    Declaration
    public static Result IsUserLoggedIn(out bool isLoggedIn)
    Parameters
    Type Name Description
    System.Boolean isLoggedIn

    Returns true if the user is logged in.

    Returns
    Type Description
    Result

    Returns whether succeeded or not to check if user is logged in.

    RequestSignUp(AuthKit.RequestSignUpCallback)

    Request the user to sign up to Trail

    Declaration
    public static void RequestSignUp(AuthKit.RequestSignUpCallback callback)
    Parameters
    Type Name Description
    AuthKit.RequestSignUpCallback callback
    Remarks

    Will return Trail.Result.AUKUserAlreadyLoggedIn if the user is already logged in, and no sign up modal will show.

    In This Article
    Back to top Generated by DocFX