import base64


def prepare_secret(secret):
    """ Converts an auth0 secret to its byte equivalent for JWT lib

    :param secret: Auth0 secret to convert, in base64 (as per Auth0 dashboard)
    :type secret: bytes
    :return: Decoded secret, compatible with :mod:`PyJWT`
    :rtype: bytes

    """
    return base64.b64decode(secret.replace(b"_", b"/").replace(b"-", b"+"))