diff --git a/client/src/components/Login/LoginForm.test.ts b/client/src/components/Login/LoginForm.test.ts index 3c8c60ba9004..bf1a57acbf0e 100644 --- a/client/src/components/Login/LoginForm.test.ts +++ b/client/src/components/Login/LoginForm.test.ts @@ -45,7 +45,7 @@ describe("LoginForm", () => { axiosMock = new MockAdapter(axios); server.use( http.get("/api/configuration", ({ response }) => { - return response.untyped(HttpResponse.json({ oidc: { cilogon: false, custos: false } })); + return response.untyped(HttpResponse.json({ oidc: { cilogon: false } })); }), ); }); diff --git a/client/src/components/Register/RegisterForm.vue b/client/src/components/Register/RegisterForm.vue index c42b739b1034..839f498c7bd9 100644 --- a/client/src/components/Register/RegisterForm.vue +++ b/client/src/components/Register/RegisterForm.vue @@ -32,7 +32,7 @@ interface Props { enableOidc?: boolean; mailingJoinAddr?: string; oidcIdps?: OIDCConfig; - preferCustosLogin?: boolean; + preferOidcLogin?: boolean; redirect?: string; registrationWarningMessage?: string; serverMailConfigured?: boolean; @@ -58,8 +58,8 @@ const labelSubscribe = ref(localize("Stay in the loop and join the galaxy-announ const idpsWithRegistration = computed(() => (props.oidcIdps ? getOIDCIdpsWithRegistration(props.oidcIdps) : {})); -const custosPreferred = computed(() => { - return props.enableOidc && props.preferCustosLogin; +const oidcPreferred = computed(() => { + return props.enableOidc && props.preferOidcLogin; }); /** This decides if all register options should be displayed in column style @@ -107,8 +107,8 @@ async function submit() { - - + + Register using institutional account @@ -116,21 +116,21 @@ async function submit() { Create a Galaxy account using an institutional account (e.g.:Google/JHU). This will - redirect you to your institutional login through Custos. + redirect you to your institutional login through OIDC. - Create a Galaxy account + Create a Galaxy account Or, register with email diff --git a/client/src/components/User/ExternalIdentities/ExternalIDHelper.ts b/client/src/components/User/ExternalIdentities/ExternalIDHelper.ts index af304b45e147..bf3de1244786 100644 --- a/client/src/components/User/ExternalIdentities/ExternalIDHelper.ts +++ b/client/src/components/User/ExternalIdentities/ExternalIDHelper.ts @@ -26,7 +26,7 @@ export type OIDCConfigWithRegistration = Record< /** Return the per-IDP config, minus anything the caller wants to hide. */ export function getFilteredOIDCIdps(oidcConfig: OIDCConfig, exclude: string[] = []): OIDCConfig { - const blacklist = new Set(["cilogon", "custos", ...exclude]); + const blacklist = new Set(["cilogon", ...exclude]); const filtered: OIDCConfig = {}; Object.entries(oidcConfig).forEach(([idp, cfg]) => { if (!blacklist.has(idp)) { @@ -51,11 +51,11 @@ export function getOIDCIdpsWithRegistration(oidcConfig: OIDCConfig): OIDCConfigW /** Do we need to show the institution picker at all? */ export const getNeedShowCilogonInstitutionList = (cfg: OIDCConfig): boolean => { - return Boolean(cfg.cilogon || cfg.custos); + return Boolean(cfg.cilogon); }; /** - * Generic OIDC login (all providers *except* CILogon/Custos). + * Generic OIDC login (all providers *except* CILogon). * Returns the redirect URI Galaxy gives back, or throws. */ export async function submitOIDCLogon(idp: string, redirectParam: string | null = null): Promise { @@ -73,13 +73,12 @@ export async function submitOIDCLogon(idp: string, redirectParam: string | null } /** - * CILogon/Custos login. - * @param idp "cilogon" | "custos" + * CILogon login. * @param useIDPHint If true, append ?idphint= * @param idpHint The entityID to hint with (ignored when useIDPHint = false) */ -export async function submitCILogon(idp: string, useIDPHint = false, idpHint?: string): Promise { - let url = withPrefix(`/authnz/${idp}/login/`); +export async function submitCILogon(useIDPHint = false, idpHint?: string): Promise { + let url = withPrefix("/authnz/cilogon/login/"); if (useIDPHint && idpHint) { url += `?idphint=${encodeURIComponent(idpHint)}`; } @@ -108,8 +107,8 @@ export async function redirectToSingleProvider(config: OIDCConfig): Promise(null); const cILogonIdps = ref([]); const selected = ref(null); const rememberIdp = ref(false); -const cilogonOrCustos = ref<"cilogon" | "custos" | null>(null); -const toggleCilogon = ref(false); const oIDCIdps = computed(() => (isConfigLoaded.value ? config.value.oidc : {})); const filteredOIDCIdps = computed(() => getFilteredOIDCIdps(oIDCIdps.value, props.excludeIdps)); -const cilogonListShow = computed(() => getNeedShowCilogonInstitutionList(oIDCIdps.value)); - -const cILogonEnabled = computed(() => oIDCIdps.value.cilogon); -const custosEnabled = computed(() => oIDCIdps.value.custos); +const cILogonConfigured = computed(() => getNeedShowCilogonInstitutionList(oIDCIdps.value)); onMounted(async () => { rememberIdp.value = getIdpPreference() !== null; - // Only fetch CILogonIDPs if custos/cilogon configured - if (cilogonListShow.value) { + // Only fetch CILogonIDPs if cilogon configured + if (cILogonConfigured.value) { await getCILogonIdps(); } }); -function toggleCILogon(idp: "cilogon" | "custos") { - if (cilogonOrCustos.value === idp || cilogonOrCustos.value === null) { - toggleCilogon.value = !toggleCilogon.value; - } - cilogonOrCustos.value = toggleCilogon.value ? idp : null; -} - async function clickOIDCLogin(idp: string) { if (loading.value) { return; @@ -99,7 +86,7 @@ async function clickOIDCLogin(idp: string) { } } -async function clickCILogin(idp: string | null) { +async function clickCILogonLogin() { if (loading.value) { return; } @@ -107,7 +94,7 @@ async function clickCILogin(idp: string | null) { setIdpPreference(); } - if (!selected.value || !idp) { + if (!selected.value) { messageVariant.value = "danger"; messageText.value = "Please select an institution."; return; @@ -116,9 +103,9 @@ async function clickCILogin(idp: string | null) { loading.value = true; try { - const redirectUri = await submitCILogon(idp, true, selected.value.EntityID); + const redirectUri = await submitCILogon(true, selected.value.EntityID); - localStorage.setItem("galaxy-provider", idp); + localStorage.setItem("galaxy-provider", "cilogon"); if (redirectUri) { window.location.href = redirectUri; @@ -183,11 +170,9 @@ function getIdpPreference() {
- - -
- - + +
+ - + Sign in with Institutional Credentials* - - - - Sign in with Custos* - -
- -
- - - Sign in with Institutional Credentials* - - - - Sign in with Custos* - - - - - - - - Login via {{ cilogonOrCustos === "cilogon" ? "CILogon" : "Custos" }} * - -

- * Galaxy uses CILogon via Custos to enable you to log in from this organization. By clicking - 'Sign In', you agree to the + * Galaxy uses CILogon to enable you to log in from this organization. By clicking 'Sign In', you + agree to the CILogon privacy policy and you agree to - share your username, email address, and affiliation with CILogon, Custos, and Galaxy. + share your username, email address, and affiliation with CILogon and Galaxy.

-