Files
plainpages/views/auth.ejs
T

34 lines
1.2 KiB
Plaintext

<%#
Themed Kratos self-service page inside the unified app shell: sign-in / register /
reset / verify / settings. Renders a FlowView (src/auth/flow-view.ts) into the shell content, reusing the
auth-card + field partials. The form posts straight to flow.ui.action — Kratos owns its CSRF. The
shell's menu is role-filtered (anonymous ⇒ public items + Sign in); the topbar carries no heading,
so the card's own <h1> is the page's single heading. Data: chrome (PageChrome), flow (FlowView).
%><%
const nav = include("partials/nav-tree", { nodes: chrome.nav });
const card = include("partials/auth-card", {
action: flow.action,
alt: flow.alt,
back: flow.back,
body: include("partials/flow-body", { flow }),
method: flow.method,
sso: { providers: flow.sso },
sub: flow.sub,
title: flow.title,
});
const body = `<div class="shell-auth"><div class="auth">${card}</div></div>`;
-%>
<%- include("partials/shell", {
body,
brand: chrome.brand,
csrfToken: chrome.csrfToken,
docTitle: flow.title,
hideSignIn: true,
nav,
signInHref: chrome.signInHref,
styles: ["/public/css/auth.css"],
theme: chrome.theme,
title: "",
user: chrome.user,
}) %>