def get_token_string(auth):
    """
    Retrieve the actual token string from a
    token creation. Used for knox support.

    :param auth: The instance or tuple returned by the token's .create()
    :type auth tuple | rest_framework.authtoken.models.Token

    :return: The actual token string
    :rtype: str
    """
    return auth[1] if isinstance(auth, tuple) else auth.key