22 lines
1.2 KiB
Plaintext
22 lines
1.2 KiB
Plaintext
<%#
|
|
OAuth2 consent form body: the inner of the auth-card form — the signed-in account, the
|
|
CSRF + challenge hidden inputs, the requested scopes, then Allow / Deny submit buttons (one
|
|
`decision` field). Locals: account?, challenge, csrfField, csrfToken, scopes (string[]). Captured
|
|
by views/oauth-consent.ejs.
|
|
-%>
|
|
<% const labels = { email: t("consent.scope.email"), offline_access: t("consent.scope.offline_access"), openid: t("consent.scope.openid"), profile: t("consent.scope.profile") }; -%>
|
|
<% if (locals.account) { -%>
|
|
<p class="auth-sub"><%= t("consent.signedInAs") %> <strong><%= account %></strong></p>
|
|
<% } -%>
|
|
<input type="hidden" name="<%= csrfField %>" value="<%= csrfToken %>">
|
|
<input type="hidden" name="consent_challenge" value="<%= challenge %>">
|
|
<% if (scopes.length) { -%>
|
|
<ul class="plain-list consent-scopes">
|
|
<% scopes.forEach((s) => { -%>
|
|
<li><strong><%= s %></strong><% if (labels[s]) { %> — <%= labels[s] %><% } %></li>
|
|
<% }) -%>
|
|
</ul>
|
|
<% } -%>
|
|
<button type="submit" class="btn btn-block btn-primary" name="decision" value="allow"><%= t("consent.allow") %></button>
|
|
<button type="submit" class="btn btn-block" name="decision" value="deny"><%= t("consent.deny") %></button>
|