Self-hosted, plugin-based server management.
TypeScript dockerhomelabpluginsrdpremote-desktopself-hostedserver-managementsftpsshterminaltermixvnc
import { describe, expect, it } from "vitest";
import { isExternalTokenCallback } from "../../utils/external-login-callback.js";
describe("isExternalTokenCallback", () => {
it.each([
"http://localhost:17850/oidc-callback",
"http://127.0.0.1:17850/oidc-callback",
"termix-mobile://oidc-callback",
])("recognizes app callback %s", (url) => {
expect(isExternalTokenCallback(url)).toBe(true);
});
it.each([
"https://localhost:17850/oidc-callback",
"http://example.com:17850/oidc-callback",
"http://localhost:17850/other",
])("rejects non-app callback %s", (url) => {
expect(isExternalTokenCallback(url)).toBe(false);
});
});