mirror of
https://github.com/bitbaum/petvity.git
synced 2026-12-06 02:09:19 +01:00
"Sign in with OrangeCat" (OIDC) is now the primary action on /login and /register; email + password stays behind a disclosure so existing accounts are not locked out. OrangeCat's own page carries Google, GitHub, email and open registration. - Provider: client_secret_post + PKCE + state, scope "openid profile email", issuer https://orangecat.ch (ORANGECAT_OAUTH_ISSUER overrides). Absent, not broken, until ORANGECAT_OAUTH_CLIENT_ID/SECRET are set. - Users are keyed ONLY on the new users.orangecat_sub (additive migration 0007). The provider profile carries no email, so Auth.js never looks a user up by email; a new sub always creates a new user. A taken email gets an undeliverable @users.invalid placeholder. - An OrangeCat login never earns ADMIN_EMAILS promotion (email unverified). - Identity only: no OrangeCat token refresh, tokens not stored. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
25 lines
688 B
TypeScript
25 lines
688 B
TypeScript
/**
|
|
* Email + password stays reachable for accounts created before "Sign in with
|
|
* OrangeCat", but no longer competes with it: a closed disclosure when
|
|
* OrangeCat is offered, the plain content when it is not.
|
|
*/
|
|
export function PasswordDisclosure({
|
|
collapsible,
|
|
summary,
|
|
children,
|
|
}: {
|
|
collapsible: boolean;
|
|
summary: string;
|
|
children: React.ReactNode;
|
|
}) {
|
|
if (!collapsible) return <>{children}</>;
|
|
return (
|
|
<details className="mt-5">
|
|
<summary className="cursor-pointer text-center text-sm text-[var(--muted)] hover:text-[var(--teal)] transition-colors">
|
|
{summary}
|
|
</summary>
|
|
<div className="mt-4">{children}</div>
|
|
</details>
|
|
);
|
|
}
|