Compare commits
6 Commits
safari-cra
...
template-f
Author | SHA1 | Date | |
---|---|---|---|
b0f8c29d69 | |||
f20d7a200e | |||
3eb2c9bcc0 | |||
037ef3a2a0 | |||
61bc89959b | |||
2797d26b93 |
@ -7,9 +7,14 @@ API Browser - {{ brand.branding_title }}
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="{% versioned_script 'dist/standalone/api-browser/index-%v.js' %}" type="module"></script>
|
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
||||||
<meta name="theme-color" content="#151515" media="(prefers-color-scheme: light)">
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||||
<meta name="theme-color" content="#151515" media="(prefers-color-scheme: dark)">
|
|
||||||
|
<script
|
||||||
|
data-test-id="entrypoint"
|
||||||
|
src="{% versioned_script 'dist/standalone/api-browser/index-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
@ -4,16 +4,20 @@
|
|||||||
<script>
|
<script>
|
||||||
window.authentik = {
|
window.authentik = {
|
||||||
locale: "{{ LANGUAGE_CODE }}",
|
locale: "{{ LANGUAGE_CODE }}",
|
||||||
config: JSON.parse('{{ config_json|escapejs }}'),
|
config: JSON.parse('{{ config_json|escapejs }}' || '{}'),
|
||||||
brand: JSON.parse('{{ brand_json|escapejs }}'),
|
brand: JSON.parse('{{ brand_json|escapejs }}' || '{}'),
|
||||||
versionFamily: "{{ version_family }}",
|
versionFamily: '{{ version_family }}',
|
||||||
versionSubdomain: "{{ version_subdomain }}",
|
versionSubdomain: '{{ version_subdomain }}',
|
||||||
build: "{{ build }}",
|
build: '{{ build }}',
|
||||||
api: {
|
api: {
|
||||||
base: "{{ base_url }}",
|
base: '{{ base_url }}',
|
||||||
relBase: "{{ base_url_rel }}",
|
relBase: '{{ base_url_rel }}',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% if messages %}
|
||||||
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", function () {
|
window.addEventListener("DOMContentLoaded", function () {
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
window.dispatchEvent(
|
window.dispatchEvent(
|
||||||
@ -29,3 +33,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
@ -2,31 +2,85 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load authentik_core %}
|
{% load authentik_core %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
<html lang="{{ get_current_language }}">
|
||||||
<html>
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
{# Darkreader breaks the site regardless of theme as its not compatible with webcomponents, and we default to a dark theme based on preferred colour-scheme #}
|
|
||||||
|
{% comment %}
|
||||||
|
Darkreader breaks the site regardless of theme as its not compatible with webcomponents,
|
||||||
|
and we default to a dark theme based on preferred colour-scheme.
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
|
|
||||||
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
|
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
|
||||||
|
|
||||||
<link rel="icon" href="{{ brand.branding_favicon_url }}">
|
<link rel="icon" href="{{ brand.branding_favicon_url }}">
|
||||||
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
|
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
|
||||||
|
|
||||||
{% block head_before %}
|
{% block head_before %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}">
|
||||||
<style>{{ brand.branding_custom_css }}</style>
|
|
||||||
<script src="{% versioned_script 'dist/poly-%v.js' %}" type="module"></script>
|
<style data-test-id="color-scheme">
|
||||||
<script src="{% versioned_script 'dist/standalone/loading/index-%v.js' %}" type="module"></script>
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
color-scheme: dark light;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style data-test-id="custom-branding-css">
|
||||||
|
{{ brand.branding_custom_css }}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script
|
||||||
|
data-test-id="entrypoint-polyfill"
|
||||||
|
src="{% versioned_script 'dist/poly-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script
|
||||||
|
data-test-id="entrypoint-loading"
|
||||||
|
src="{% versioned_script 'dist/standalone/loading/index-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<meta name="sentry-trace" content="{{ sentry_trace }}" />
|
|
||||||
|
<meta name="sentry-trace" content="{{ sentry_trace }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% block body %}
|
{% block body %}{% endblock %}
|
||||||
{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
{% block scripts %}
|
|
||||||
{% endblock %}
|
<noscript>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: var(--ak-font-family-base), sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
{% blocktrans with brand_title=title|default:brand.branding_title %}
|
||||||
|
JavaScript is required to use {{ brand_title }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% trans 'Please enable JavaScript in your browser settings and reload the page. If you are using a browser extension that blocks JavaScript, please disable it for this site.' %}
|
||||||
|
</p>
|
||||||
|
</noscript>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -3,14 +3,21 @@
|
|||||||
{% load authentik_core %}
|
{% load authentik_core %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="{% versioned_script 'dist/admin/AdminInterface-%v.js' %}" type="module"></script>
|
|
||||||
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
||||||
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||||
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
|
|
||||||
|
<script
|
||||||
|
data-test-id="entrypoint"
|
||||||
|
src="{% versioned_script 'dist/admin/AdminInterface-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<ak-message-container></ak-message-container>
|
<ak-message-container></ak-message-container>
|
||||||
|
|
||||||
<ak-interface-admin>
|
<ak-interface-admin>
|
||||||
<ak-loading></ak-loading>
|
<ak-loading></ak-loading>
|
||||||
</ak-interface-admin>
|
</ak-interface-admin>
|
||||||
|
@ -14,7 +14,11 @@
|
|||||||
{% block card %}
|
{% block card %}
|
||||||
<form method="POST" class="pf-c-form">
|
<form method="POST" class="pf-c-form">
|
||||||
<p>{% trans message %}</p>
|
<p>{% trans message %}</p>
|
||||||
<a id="ak-back-home" href="{% url 'authentik_core:root-redirect' %}" class="pf-c-button pf-m-primary">
|
|
||||||
|
<a
|
||||||
|
id="ak-back-home"
|
||||||
|
href="{% url 'authentik_core:root-redirect' %}"
|
||||||
|
class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Go home' %}
|
{% trans 'Go home' %}
|
||||||
</a>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
|
@ -3,14 +3,21 @@
|
|||||||
{% load authentik_core %}
|
{% load authentik_core %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="{% versioned_script 'dist/user/UserInterface-%v.js' %}" type="module"></script>
|
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
||||||
<meta name="theme-color" content="#1c1e21" media="(prefers-color-scheme: light)">
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||||
<meta name="theme-color" content="#1c1e21" media="(prefers-color-scheme: dark)">
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
|
|
||||||
|
<script
|
||||||
|
data-test-id="entrypoint"
|
||||||
|
src="{% versioned_script 'dist/user/UserInterface-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<ak-message-container></ak-message-container>
|
<ak-message-container></ak-message-container>
|
||||||
|
|
||||||
<ak-interface-user>
|
<ak-interface-user>
|
||||||
<ak-loading></ak-loading>
|
<ak-loading></ak-loading>
|
||||||
</ak-interface-user>
|
</ak-interface-user>
|
||||||
|
@ -4,14 +4,21 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block head_before %}
|
{% block head_before %}
|
||||||
<link rel="prefetch" href="{{ request.brand.branding_default_flow_background_url }}" />
|
<link rel="prefetch" href="{{ request.brand.branding_default_flow_background_url }}">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'dist/theme-dark.css' %}" media="(prefers-color-scheme: dark)">
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="{% static 'dist/theme-dark.css' %}"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
>
|
||||||
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<style>
|
<style data-test-id="base-full-root-styles">
|
||||||
:root {
|
:root {
|
||||||
--ak-flow-background: url("{{ request.brand.branding_default_flow_background_url }}");
|
--ak-flow-background: url("{{ request.brand.branding_default_flow_background_url }}");
|
||||||
--pf-c-background-image--BackgroundImage: var(--ak-flow-background);
|
--pf-c-background-image--BackgroundImage: var(--ak-flow-background);
|
||||||
@ -20,6 +27,7 @@
|
|||||||
--pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background);
|
--pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background);
|
||||||
--pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background);
|
--pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Form with user */
|
/* Form with user */
|
||||||
.form-control-static {
|
.form-control-static {
|
||||||
margin-top: var(--pf-global--spacer--sm);
|
margin-top: var(--pf-global--spacer--sm);
|
||||||
@ -27,13 +35,16 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control-static .avatar {
|
.form-control-static .avatar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control-static img {
|
.form-control-static img {
|
||||||
margin-right: var(--pf-global--spacer--xs);
|
margin-right: var(--pf-global--spacer--xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control-static a {
|
.form-control-static a {
|
||||||
padding-top: var(--pf-global--spacer--xs);
|
padding-top: var(--pf-global--spacer--xs);
|
||||||
padding-bottom: var(--pf-global--spacer--xs);
|
padding-bottom: var(--pf-global--spacer--xs);
|
||||||
@ -43,26 +54,30 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="pf-c-background-image">
|
<div class="pf-c-background-image"></div>
|
||||||
</div>
|
|
||||||
<ak-message-container></ak-message-container>
|
<ak-message-container></ak-message-container>
|
||||||
|
|
||||||
<div class="pf-c-login stacked">
|
<div class="pf-c-login stacked">
|
||||||
<div class="ak-login-container">
|
<div class="ak-login-container">
|
||||||
<main class="pf-c-login__main">
|
<main class="pf-c-login__main">
|
||||||
<div class="pf-c-login__main-header pf-c-brand ak-brand">
|
<div class="pf-c-login__main-header pf-c-brand ak-brand">
|
||||||
<img src="{{ brand.branding_logo_url }}" alt="authentik Logo" />
|
<img src="{{ brand.branding_logo_url }}" alt="authentik Logo">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<header class="pf-c-login__main-header">
|
<header class="pf-c-login__main-header">
|
||||||
<h1 class="pf-c-title pf-m-3xl">
|
<h1 class="pf-c-title pf-m-3xl">
|
||||||
{% block card_title %}
|
{% block card_title %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="pf-c-login__main-body">
|
<div class="pf-c-login__main-body">
|
||||||
{% block card %}
|
{% block card %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="pf-c-login__footer">
|
<footer class="pf-c-login__footer">
|
||||||
<ul class="pf-c-list pf-m-inline">
|
<ul class="pf-c-list pf-m-inline">
|
||||||
{% for link in footer_links %}
|
{% for link in footer_links %}
|
||||||
@ -70,10 +85,9 @@
|
|||||||
<a href="{{ link.href }}">{{ link.name }}</a>
|
<a href="{{ link.href }}">{{ link.name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span>
|
<span>{% trans 'Powered by authentik' %}</span>
|
||||||
{% trans 'Powered by authentik' %}
|
|
||||||
</span>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -2,30 +2,38 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load authentik_core %}
|
{% load authentik_core %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
|
||||||
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
|
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
|
||||||
|
|
||||||
<link rel="icon" href="{{ brand.branding_favicon_url }}">
|
<link rel="icon" href="{{ brand.branding_favicon_url }}">
|
||||||
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
|
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
|
||||||
|
|
||||||
{% block head_before %}
|
{% block head_before %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
|
||||||
<meta name="sentry-trace" content="{{ sentry_trace }}" />
|
<meta name="sentry-trace" content="{{ sentry_trace }}">
|
||||||
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: url("{{ flow.background_url }}");
|
background-image: url("{{ flow.background_url }}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
}
|
}
|
||||||
@ -38,17 +46,19 @@
|
|||||||
.form-signin .form-floating:focus-within {
|
.form-signin .form-floating:focus-within {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-icon {
|
.brand-icon {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="d-flex align-items-center py-4 bg-body-tertiary">
|
<body class="d-flex align-items-center py-4 bg-body-tertiary">
|
||||||
<div class="card m-auto">
|
<div class="card m-auto">
|
||||||
<main class="form-signin w-100 m-auto" id="flow-sfe-container">
|
<main class="form-signin w-100 m-auto" id="flow-sfe-container"></main>
|
||||||
</main>
|
|
||||||
<span class="mt-3 mb-0 text-muted text-center">{% trans 'Powered by authentik' %}</span>
|
<span class="mt-3 mb-0 text-muted text-center">{% trans 'Powered by authentik' %}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="{% static 'dist/sfe/index.js' %}"></script>
|
<script src="{% static 'dist/sfe/index.js' %}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -5,21 +5,35 @@
|
|||||||
|
|
||||||
{% block head_before %}
|
{% block head_before %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<link rel="prefetch" href="{{ flow.background_url }}" />
|
|
||||||
|
<link rel="prefetch" href="{{ flow.background_url }}">
|
||||||
|
|
||||||
{% if flow.compatibility_mode and not inspector %}
|
{% if flow.compatibility_mode and not inspector %}
|
||||||
<script>ShadyDOM = { force: !navigator.webdriver };</script>
|
<script>
|
||||||
|
window.ShadyDOM = { force: !navigator.webdriver };
|
||||||
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.authentik.flow = {
|
window.authentik.flow = {
|
||||||
"layout": "{{ flow.layout }}",
|
layout: "{{ flow.layout }}",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<meta name="ak-flow-layout" content="{{ flow.layout }}">
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}" type="module"></script>
|
<script
|
||||||
<style>
|
data-test-id="entrypoint"
|
||||||
|
src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style data-test-id="flow-root-styles">
|
||||||
:root {
|
:root {
|
||||||
--ak-flow-background: url("{{ flow.background_url }}");
|
--ak-flow-background: url("{{ flow.background_url }}");
|
||||||
}
|
}
|
||||||
|
@ -5,21 +5,28 @@
|
|||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let redirecting = false;
|
let redirecting = false;
|
||||||
|
|
||||||
const checkAuth = async () => {
|
const checkAuth = async () => {
|
||||||
if (redirecting) return true;
|
if (redirecting) return true;
|
||||||
|
|
||||||
const url = "{{ check_auth_url }}";
|
const url = "{{ check_auth_url }}";
|
||||||
console.debug("authentik/policies/buffer: Checking authentication...");
|
console.debug("authentik/policies/buffer: Checking authentication...");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await fetch(url, {
|
const result = await fetch(url, {
|
||||||
method: "HEAD",
|
method: "HEAD",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.status >= 400) {
|
if (result.status >= 400) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug("authentik/policies/buffer: Continuing");
|
console.debug("authentik/policies/buffer: Continuing");
|
||||||
redirecting = true;
|
redirecting = true;
|
||||||
|
|
||||||
if ("{{ auth_req_method }}" === "post") {
|
if ("{{ auth_req_method }}" === "post") {
|
||||||
document.querySelector("form").submit();
|
document.querySelector("form").submit();
|
||||||
} else {
|
} else {
|
||||||
@ -29,24 +36,35 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let timeout = 100;
|
let timeout = 100;
|
||||||
let offset = 20;
|
let offset = 20;
|
||||||
let attempt = 0;
|
let attempt = 0;
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
attempt += 1;
|
attempt += 1;
|
||||||
|
|
||||||
await checkAuth();
|
await checkAuth();
|
||||||
|
|
||||||
console.debug(`authentik/policies/buffer: Waiting ${timeout}ms...`);
|
console.debug(`authentik/policies/buffer: Waiting ${timeout}ms...`);
|
||||||
|
|
||||||
setTimeout(main, timeout);
|
setTimeout(main, timeout);
|
||||||
|
|
||||||
timeout += (offset * attempt);
|
timeout += (offset * attempt);
|
||||||
|
|
||||||
if (timeout >= 2000) {
|
if (timeout >= 2000) {
|
||||||
timeout = 2000;
|
timeout = 2000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("visibilitychange", async () => {
|
document.addEventListener("visibilitychange", async () => {
|
||||||
if (document.hidden) return;
|
if (document.hidden) return;
|
||||||
|
|
||||||
console.debug("authentik/policies/buffer: Checking authentication on tab activate...");
|
console.debug("authentik/policies/buffer: Checking authentication on tab activate...");
|
||||||
|
|
||||||
await checkAuth();
|
await checkAuth();
|
||||||
});
|
});
|
||||||
|
|
||||||
main();
|
main();
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -63,9 +81,10 @@
|
|||||||
<form class="pf-c-form" method="{{ auth_req_method }}" action="{{ continue_url }}">
|
<form class="pf-c-form" method="{{ auth_req_method }}" action="{{ continue_url }}">
|
||||||
{% if auth_req_method == "post" %}
|
{% if auth_req_method == "post" %}
|
||||||
{% for key, value in auth_req_body.items %}
|
{% for key, value in auth_req_body.items %}
|
||||||
<input type="hidden" name="{{ key }}" value="{{ value }}" />
|
<input type="hidden" name="{{ key }}" value="{{ value }}">
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="pf-c-empty-state">
|
<div class="pf-c-empty-state">
|
||||||
<div class="pf-c-empty-state__content">
|
<div class="pf-c-empty-state__content">
|
||||||
<div class="pf-c-empty-state__icon">
|
<div class="pf-c-empty-state__icon">
|
||||||
@ -75,11 +94,13 @@
|
|||||||
<span class="pf-c-spinner__tail-ball"></span>
|
<span class="pf-c-spinner__tail-ball"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 class="pf-c-title pf-m-lg">
|
<h1 class="pf-c-title pf-m-lg">
|
||||||
{% trans "You're already authenticating in another tab. This page will refresh once authentication is completed." %}
|
{% trans "You're already authenticating in another tab. This page will refresh once authentication is completed." %}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pf-c-form__group pf-m-action">
|
<div class="pf-c-form__group pf-m-action">
|
||||||
<a href="{{ auth_req_url }}" class="pf-c-button pf-m-primary pf-m-block">
|
<a href="{{ auth_req_url }}" class="pf-c-button pf-m-primary pf-m-block">
|
||||||
{% trans "Authenticate in this tab" %}
|
{% trans "Authenticate in this tab" %}
|
||||||
|
@ -14,11 +14,12 @@
|
|||||||
{% block card %}
|
{% block card %}
|
||||||
<form class="pf-c-form">
|
<form class="pf-c-form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<div class="pf-c-form__group">
|
<div class="pf-c-form__group">
|
||||||
<div class="form-control-static">
|
<div class="form-control-static">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<img class="pf-c-avatar" src="{{ user.avatar }}" alt="{% trans "User's avatar" %}" />
|
<img class="pf-c-avatar" src="{{ user.avatar }}" alt="{% trans "User's avatar" %}">
|
||||||
{{ user.username }}
|
{{ user.username }}
|
||||||
</div>
|
</div>
|
||||||
<div slot="link">
|
<div slot="link">
|
||||||
@ -27,37 +28,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="pf-c-form__group">
|
<div class="pf-c-form__group">
|
||||||
<p>
|
<p>
|
||||||
<i class="pf-icon pf-icon-error-circle-o"></i>
|
<i class="pf-icon pf-icon-error-circle-o"></i>
|
||||||
{% trans 'Request has been denied.' %}
|
{% trans 'Request has been denied.' %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<hr>
|
<hr>
|
||||||
<p>
|
|
||||||
{{ error }}
|
<p>{{ error }}</p>
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if policy_result %}
|
{% if policy_result %}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
{% if policy_result.messages %}
|
{% if policy_result.messages %}
|
||||||
<em>{% trans 'Messages:' %}</em>
|
<em>{% trans 'Messages:' %}</em>
|
||||||
|
|
||||||
<ul class="pf-c-list">
|
<ul class="pf-c-list">
|
||||||
{% for message in policy_result.messages %}
|
{% for message in policy_result.messages %}
|
||||||
<li>
|
<li>{{ message }}</li>
|
||||||
{{ message }}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if policy_result.source_results %}
|
{% if policy_result.source_results %}
|
||||||
<em>{% trans 'Explanation:' %}</em>
|
<em>{% trans 'Explanation:' %}</em>
|
||||||
|
|
||||||
<ul class="pf-c-list">
|
<ul class="pf-c-list">
|
||||||
{% for source_result in policy_result.source_results %}
|
{% for source_result in policy_result.source_results %}
|
||||||
<li>
|
<li>
|
||||||
{% blocktrans with name=source_result.source_binding result=source_result.passing %}
|
{% blocktrans with name=source_result.source_binding result=source_result.passing %}
|
||||||
Policy binding '{{ name }}' returned result '{{ result }}'
|
Policy binding '{{ name }}' returned result '{{ result }}'
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
{% if source_result.messages %}
|
{% if source_result.messages %}
|
||||||
<ul class="pf-c-list">
|
<ul class="pf-c-list">
|
||||||
{% for message in source_result.messages %}
|
{% for message in source_result.messages %}
|
||||||
|
@ -3,12 +3,18 @@
|
|||||||
{% load authentik_core %}
|
{% load authentik_core %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="{% versioned_script 'dist/rac/index-%v.js' %}" type="module"></script>
|
|
||||||
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
|
||||||
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||||
|
|
||||||
<link rel="icon" href="{{ tenant.branding_favicon_url }}">
|
<link rel="icon" href="{{ tenant.branding_favicon_url }}">
|
||||||
<link rel="shortcut icon" href="{{ tenant.branding_favicon_url }}">
|
<link rel="shortcut icon" href="{{ tenant.branding_favicon_url }}">
|
||||||
|
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
|
|
||||||
|
<script
|
||||||
|
src="{% versioned_script 'dist/rac/index-%v.js' %}"
|
||||||
|
type="module">
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
@ -23,6 +24,7 @@
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" class="btn btn-primary">
|
<td align="center" class="btn btn-primary">
|
||||||
{{ token }}
|
{{ token }}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
@ -19,14 +20,22 @@
|
|||||||
{% trans "We're excited to have you get started. First, you need to confirm your account. Just press the button below."%}
|
{% trans "We're excited to have you get started. First, you need to confirm your account. Just press the button below."%}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" class="btn btn-primary">
|
<td align="center" class="btn btn-primary">
|
||||||
<a id="confirm" href="{{ url }}" rel="noopener noreferrer" target="_blank">{% trans 'Confirm Account' %}</a>
|
<a
|
||||||
|
id="confirm"
|
||||||
|
href="{{ url }}"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank">
|
||||||
|
{% trans 'Confirm Account' %}
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{% load authentik_stages_email %}
|
{% load authentik_stages_email %}
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtm=l">
|
<html xmlns="http://www.w3.org/1999/xhtm=l">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
@ -99,11 +100,13 @@
|
|||||||
<img src="{% block logo_url %}cid:logo.png{% endblock %}" border="0=" alt="authentik logo" class="flexibleImage logo">
|
<img src="{% block logo_url %}cid:logo.png{% endblock %}" border="0=" alt="authentik logo" class="flexibleImage logo">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" style="margin-top: 10px;" width="100%">
|
<table border="0" style="margin-top: 10px;" width="100%">
|
||||||
@ -118,6 +121,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
Powered by <a rel="noopener noreferrer" target="_blank" href="https://goauthentik.io?utm_source=authentik&utm_medium=email">authentik</a>.
|
Powered by <a rel="noopener noreferrer" target="_blank" href="https://goauthentik.io?utm_source=authentik&utm_medium=email">authentik</a>.
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
@ -18,6 +19,7 @@
|
|||||||
{{ body }}
|
{{ body }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% if key_value %}
|
{% if key_value %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
@ -23,9 +24,16 @@
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" class="btn btn-primary">
|
<td align="center" class="btn btn-primary">
|
||||||
<a id="confirm" href="{{ url }}" rel="noopener noreferrer" target="_blank">{% trans 'Reset Password' %}</a>
|
<a
|
||||||
|
id="confirm"
|
||||||
|
href="{{ url }}"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank">
|
||||||
|
{% trans 'Reset Password' %}
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
{% trans 'authentik Test-Email' %}
|
{% trans 'authentik Test-Email' %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="content-wrap">
|
<td class="content-wrap">
|
||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
@ -4,15 +4,21 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
|
||||||
<title>{{.Title}}</title>
|
<title>{{.Title}}</title>
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/png" href="/outpost.goauthentik.io/static/dist/assets/icons/icon.png">
|
<link rel="shortcut icon" type="image/png" href="/outpost.goauthentik.io/static/dist/assets/icons/icon.png">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/patternfly.min.css">
|
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/patternfly.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/authentik.css">
|
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/authentik.css">
|
||||||
<link rel="prefetch" href="/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg" />
|
|
||||||
|
<link rel="prefetch" href="/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.pf-c-background-image::before {
|
.pf-c-background-image::before {
|
||||||
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
|
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
|
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
|
||||||
--pf-c-background-image--BackgroundImage: var(--ak-flow-background);
|
--pf-c-background-image--BackgroundImage: var(--ak-flow-background);
|
||||||
@ -23,27 +29,32 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="pf-c-background-image">
|
<div class="pf-c-background-image"></div>
|
||||||
</div>
|
|
||||||
<div class="pf-c-login stacked">
|
<div class="pf-c-login stacked">
|
||||||
<div class="ak-login-container">
|
<div class="ak-login-container">
|
||||||
<main class="pf-c-login__main">
|
<main class="pf-c-login__main">
|
||||||
<div class="pf-c-login__main-header pf-c-brand ak-brand">
|
<div class="pf-c-login__main-header pf-c-brand ak-brand">
|
||||||
<img src="/outpost.goauthentik.io/static/dist/assets/icons/icon_left_brand.svg" alt="authentik Logo" />
|
<img src="/outpost.goauthentik.io/static/dist/assets/icons/icon_left_brand.svg" alt="authentik Logo">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<header class="pf-c-login__main-header">
|
<header class="pf-c-login__main-header">
|
||||||
<h1 class="pf-c-title pf-m-3xl">
|
<h1 class="pf-c-title pf-m-3xl">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="pf-c-login__main-body">
|
<div class="pf-c-login__main-body">
|
||||||
{{ .Message }}
|
{{ .Message }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pf-c-login__main-body">
|
<div class="pf-c-login__main-body">
|
||||||
<a href="/" class="pf-c-button pf-m-primary pf-m-block">Go to home</a>
|
<a href="/" class="pf-c-button pf-m-primary pf-m-block">Go to home</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="pf-c-login__footer">
|
<footer class="pf-c-login__footer">
|
||||||
<ul class="pf-c-list pf-m-inline">
|
<ul class="pf-c-list pf-m-inline">
|
||||||
<li>
|
<li>
|
||||||
|
Reference in New Issue
Block a user