# Enter any hubs configuration here

SECRET_KEY = "{{ hubs_secret_key }}"

{% if hubs_dev_mode %}
# Allow the cookie to be sent of http since we work on localhost
OIDC_ID_TOKEN_COOKIE_SECURE = False
{% endif %}

OIDC_CLIENT_SECRETS = "{{ hubs_conf_dir }}/client_secrets.json"
OIDC_OPENID_REALM = "{{ hubs_url }}/oidc_callback"
{% if hubs_ssl_cert == None %}
# There's an SSL proxy, flask_oidc will generate a redirect_uri without https
# if we don't overwrite it here.
OVERWRITE_REDIRECT_URI = "{{ hubs_url }}/oidc_callback"
{% endif %}

SSE_URL = {
    # "host": "sse.example.com",
    {% if hubs_dev_mode %}
    "port": "8080",
    {% else %}
    {% if hubs_ssl_cert == None %}
    "scheme": "https",  # Because of the SSL proxy
    {% endif %}
    "path": "/sse",
    {% endif %}
}
