1147e5e78e17c3c47d7e625fe4d80f8f3f88b48b gperez2 Fri Aug 28 13:16:15 2026 -0700 Updating hgLogin's "choose a username" page to inform that a new account is created, refs #37929 diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index b570e879194..85904827b20 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -1927,30 +1927,44 @@ if (isEmpty(provider) || !pendingIdentityValid()) { clearPendingIdentity(); displayLoginPage(conn); return; } char *suggested = cartUsualString(cart, "hgLogin_userName", ""); if (isEmpty(suggested)) suggested = suggestUsername(conn, email, name); char *encSuggested = htmlEncode(suggested); // both go into value="" attributes; escape (XSS) char *encEmail = htmlEncode(email); hPrintf("<div id=\"completeAccountBox\" class=\"centeredContainer formBox\">" "<h2>%s</h2>", brwName); hPrintf("<h3>Choose a username</h3>"); +if (sameWord(provider, "orcid")) + hPrintf("<p>A new genome browser account is created for any ORCID sign-in not seen before, " + "because ORCID only shares an ORCID iD, not an email address. So you cannot sign into an " + "existing account using ORCID. Use another sign-in option instead if you don't want to " + "create a new account.</p>" + "<p>Pick a username for your %s account. You can change the suggested name below.</p>", + brwName); +else if (sameWord(provider, "cilogon")) + hPrintf("<p>A new genome browser account is created for any CILogon sign-in not seen before. " + "So you cannot sign into an existing account using CILogon this way. Use another sign-in " + "option instead if you don't want to create a new account.</p>" + "<p>Pick a username for your %s account. You can change the suggested name below.</p>", + brwName); +else hPrintf("<p>You signed in with %s. Pick a username for your new %s account. " "You can change the suggested name below.</p>", oauthProviderLabel(provider), brwName); printUsernameNote(); hPrintf("<span style='color:red;'>%s</span>", errMsg ? errMsg : ""); hPrintf("<form method=\"post\" action=\"%s\" name=\"completeAccountForm\">", hgLoginUrl); hPrintf("<div class=\"inputGroup\">" "<label for=\"userName\">Username</label>" "<input type=\"text\" name=\"hgLogin_userName\" value=\"%s\" size=\"30\" id=\"userName\">" "</div>", encSuggested); hPrintf("<div class=\"inputGroup\">" "<label for=\"emailAddr\">Email address</label>" "<input type=\"text\" name=\"hgLogin_email\" value=\"%s\" size=\"30\" id=\"emailAddr\">" "</div>", encEmail); hPrintf("<div class=\"formControls\">"