mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
feat: add auth extension points and one ssh connect pipeline
This commit is contained in:
1 parent
d3c209af13
commit
d774df8b41
159 files changed
+43243
-7451
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useSecondFactors } from "@/plugin-host/auth-registry";
|
||||
|
||||
/**
|
||||
* Enrolment sections second-factor plugins register. Core's own TOTP and
|
||||
* passkey sections sit above this until they move into plugins.
|
||||
*/
|
||||
export function PluginSecondFactorEnrollment() {
|
||||
const { t } = useTranslation();
|
||||
const factors = useSecondFactors().filter(
|
||||
(factor) => factor.enrollment && factor.pluginId !== "core",
|
||||
);
|
||||
if (factors.length === 0) return null;
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
{factors.map((factor) => {
|
||||
const Enrollment = factor.enrollment!;
|
||||
return (
|
||||
<div key={factor.id} className="flex flex-col gap-2">
|
||||
<span className="text-[10px] font-bold uppercase tracking-widest text-muted-foreground">
|
||||
{t(factor.titleKey)}
|
||||
</span>
|
||||
<Enrollment />
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user