feat(auth): remove unused backendClaims and simplify verification messages
This commit is contained in:
parent
41500eaeff
commit
dea090b501
@ -1,7 +1,7 @@
|
||||
import { useAuth } from "../auth/AuthProvider";
|
||||
|
||||
export default function AuthStatus() {
|
||||
const { enabled, status, user, backendClaims, verifying, signingIn, signInWithGoogle, signOut, error } = useAuth();
|
||||
const { enabled, status, user, verifying, signingIn, signInWithGoogle, signOut, error } = useAuth();
|
||||
|
||||
if (!enabled) {
|
||||
return <div className="auth-chip muted">Auth off</div>;
|
||||
@ -25,9 +25,11 @@ export default function AuthStatus() {
|
||||
{user.photoURL && <img src={user.photoURL} alt="" className="auth-avatar" referrerPolicy="no-referrer" />}
|
||||
<div className="auth-meta">
|
||||
<div className="auth-name">{user.displayName || user.email || user.uid}</div>
|
||||
{verifying && (
|
||||
<div className="auth-subtle">
|
||||
{verifying ? "確認中…" : backendClaims ? "バックエンド認証済み" : "未確認"}
|
||||
確認中…
|
||||
</div>
|
||||
)}
|
||||
{error && <div className="auth-error">{error}</div>}
|
||||
</div>
|
||||
<button className="auth-signout" onClick={() => signOut().catch(() => { })}>サインアウト</button>
|
||||
|
||||
@ -318,7 +318,7 @@ export default function ShowsPage() {
|
||||
削除は認証後のみ実行できます。サイドバー下部の「管理用サインイン」からログインしてください。
|
||||
{isAuthed && (
|
||||
<span style={{ color: backendClaims ? "#6de3a2" : "#f0d000" }}>
|
||||
{" "} {verifying ? "トークン確認中…" : backendClaims ? "バックエンドで確認済み" : "未確認トークン"}
|
||||
{" "} {verifying ? "トークン確認中…" : backendClaims ? "サインイン済み" : "未確認トークン"}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
@ -372,7 +372,7 @@ export default function ShowsPage() {
|
||||
<div className="selection-title">第{selectedShow.ep_num}話:{selectedShow.ep_title}</div>
|
||||
<div className="selection-note">
|
||||
{idToken
|
||||
? (verifying ? "トークン確認中…" : backendClaims ? "バックエンドで確認済み" : "バックエンド未確認")
|
||||
? (verifying ? "トークン確認中…" : "サインイン済み")
|
||||
: "削除にはサインインが必要です(サイドバー下部の管理用サインインから)"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user