Files
2026-10-03 12:37:38 +08:00

29 lines
2.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{/* 登出確認頁(GET /logout)。以 layout.html(側邊導覽欄版面)為根模板
組合渲染,本檔僅定義區塊。RP-Initiated Logout 1.0 §2:未提供
id_token_hint、或提示的 ID token 不屬於目前 Session 時,OP 必須先
詢問 End-User 是否登出——使用者直接造訪 /logout 亦同。原始請求的
每個參數以隱藏欄位原封帶回 POST /logout(decision=logout 確認登出;
decision=cancel 維持登入並返回帳號首頁)。 */}}
{{define "title"}}登出確認 - alterminal{{end}}
{{define "content"}}
<section class="rounded-xl bg-white p-8 shadow-lg dark:bg-neutral-800 dark:shadow-black/40">
<h1 class="mb-1 text-xl font-semibold">您確定要登出嗎?</h1>
<p class="mb-6 text-sm text-neutral-500 dark:text-neutral-400">
{{if .AppName}}應用程式 <strong class="text-neutral-900 dark:text-neutral-100">{{.AppName}}</strong> 要求登出您在本服務的帳號。{{else}}登出將結束您在本服務的 Session。{{end}}
</p>
{{if .Error}}<p class="mb-4 rounded-lg bg-red-500/10 px-3 py-2.5 text-sm text-red-600 dark:text-red-400" role="alert">{{.Error}}</p>{{end}}
<form method="post" action="/logout">
{{range $k, $vs := .Params}}{{range $vs}}<input type="hidden" name="{{$k}}" value="{{.}}">{{end}}{{end}}
<input type="hidden" name="csrf_token" value="{{.CSRF}}">
<div class="flex flex-col gap-3 sm:flex-row">
<button type="submit" name="decision" value="logout"
class="rounded-lg bg-brand px-5 py-2.5 text-sm font-semibold text-white hover:bg-brand-strong">登出</button>
<button type="submit" name="decision" value="cancel"
class="rounded-lg border border-neutral-300 px-5 py-2.5 text-sm font-semibold hover:bg-neutral-100 dark:border-neutral-600 dark:hover:bg-neutral-700">取消</button>
</div>
</form>
<p class="mt-4 text-xs text-neutral-400 dark:text-neutral-500">登出後,所有以本帳號單一登入的應用程式都需要重新登入。</p>
</section>
{{end}}