fix(frontend): SuperOAuth flow — VITE_SUPEROAUTH_URL, redirect par provider, pas de client_id
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 29s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped

This commit is contained in:
2026-03-14 07:39:51 +01:00
parent f1de2bb065
commit 75aad8968f
3 changed files with 13 additions and 5 deletions

View File

@@ -8,7 +8,12 @@ interface HeaderProps {
}
export default function Header({ theme, onToggleTheme, user }: HeaderProps) {
const loginUrl = import.meta.env.VITE_SUPEROAUTH_AUTHORIZE_URL;
const callbackUrl = encodeURIComponent(
`${window.location.origin}/callback`
);
// Redirige vers SuperOAuth — l'utilisateur choisit son provider (Discord, GitHub, Google, Twitch)
// SuperOAuth redirige ensuite vers /callback?token=JWT&refresh=...
const loginUrl = `${import.meta.env.VITE_SUPEROAUTH_URL}/api/v1/auth/oauth/discord?redirectUrl=${callbackUrl}`;
return (
<header className="border-b border-od-border bg-od-surface">