${glyph(USER, "account-avatar")}${glyph(LOCK)}Held only on your devices
+
${glyph(SHIELD)}Save your recovery kitIf you lose every device, it brings your ID back. Whoever holds it can take your ID, so keep it offline.
+
Devices
+ ${row("devices", LAPTOP, "Your devices", "See where your ID is, or remove a device")}
+ ${row("link", PLUS, "Add a device", "A phone, a computer or another Prism app")}
+ ${row("join", LOGIN, "Use an ID you already have", "Bring your Prism ID here from another device")}
+
Recovery
+ ${row("guard", USERS, "Add a guardian", "Someone you trust, who helps you recover", true)}
+ ${row("recover", BUOY, "Recover with a kit", "Lost your devices? Start here")}
+ ${row("guardian", HEART, "Be someone's guardian", "Keep a share of a friend's recovery")}
+ ${row("help", KEY, "Help someone recover", "Release your share to a person you know", true)}
-
On a phone, scan this code. On another app or computer, open the person icon, choose Use my Prism id from another device or app, and paste the link. It works once, for five minutes.
+
On a phone, scan this code. On a computer or in another Prism app, open Prism ID, choose Use an ID you already have and paste the link. It works once, for five minutes.
-
On a device or app that has your Prism id, open the person icon, choose Add a device or app, and paste its link here.
+
On a device that has your Prism ID, open Prism ID, choose Add a device and paste its link here.
-
+
-
Choose the recovery kit you saved. This browser becomes your Prism id's device, every other device is removed, and you get a new kit to save.
+
Choose the recovery kit you saved. This browser becomes your Prism ID's device, every other device is removed, and you get a new kit to save.
-
This kit also needs your guardian. Send them this link; they open the person icon in a Prism app, choose Help someone recover and paste it. Then read them this code:
+
This kit also needs your guardian. Send them this link; they open Prism ID in any Prism app, choose Help someone recover and paste it. Then read them this code:
-
Ask someone you trust to open the person icon in any Prism app, choose Be someone's guardian, and send you the link it shows. Paste it here.
+
Ask someone you trust to open Prism ID in any Prism app, choose Be someone's guardian, and send you the link it shows. Paste it here.
@@ -630,17 +639,17 @@ const ACCOUNT_PANEL = `
-
+
`;
const TITLES = {
- held: ["Prism id", "Every Prism app knows you by it. There is nothing to sign in to."],
- kit: ["Prism id", "Save your recovery kit: if you lose every device, it brings your id back. Anyone holding it can take your id, so keep it offline."],
- offer: ["Add a device or app", ""],
- join: ["Use your Prism id here", ""],
- recover: ["Use a recovery kit", ""],
- devices: ["Devices", "Removing one stops it signing the next time it syncs."],
- guard: ["Add a guardian", "Your new kit then needs them too: a lost or copied kit alone cannot bring your id back."],
+ held: ["Prism ID", "Every Prism app knows you by this ID. There is no password to remember and no account to make."],
+ kit: ["Prism ID", "Every Prism app knows you by this ID. There is no password to remember and no account to make."],
+ offer: ["Add a device", ""],
+ join: ["Use an ID you already have", ""],
+ recover: ["Recover with a kit", ""],
+ devices: ["Your devices", "A device you remove can no longer act as you once it syncs."],
+ guard: ["Add a guardian", "Your new kit then needs them too, so a lost or copied kit alone cannot bring your ID back."],
guardian: ["Be someone's guardian", ""],
help: ["Help someone recover", ""],
};
@@ -675,13 +684,13 @@ export function accounts(frame, core) {
$("title").textContent = title;
$("sub").textContent = sub;
$("sub").hidden = !sub;
- $("kit-save").hidden = !kit;
+ $("kit").hidden = !kit;
for (const name of ["link", "devices", "guardian"]) $(name).hidden = !held;
// A kit of one paper share can gain a guardian; one that has one cannot change it without them.
$("guard").hidden = !held || guarded;
$("help").hidden = !held || !guarding.length;
$("back").hidden = view === "held";
- $("id").textContent = held ? short(held.prism) : "Making your Prism id";
+ $("id").textContent = held ? short(held.prism) : "Making your Prism ID";
$("id").title = held?.prism ?? "";
}
const show = (next) => {
@@ -889,7 +898,7 @@ export function accounts(frame, core) {
await forgetKit();
await session(Prism);
show("held");
- say("This app uses your Prism id");
+ say("This app uses your Prism ID");
}),
);
@@ -941,7 +950,7 @@ export function accounts(frame, core) {
accountChannel.session = null;
await session(Prism);
show("held");
- say("Prism id recovered");
+ say("Prism ID recovered");
}),
);
@@ -1100,14 +1109,13 @@ export function accounts(frame, core) {
endLink();
show("held");
});
+ // An icon button confirms with a check and says so; a word button says it in place.
const copy = async (button, text) => {
- try {
- await navigator.clipboard.writeText(text);
- button.textContent = "Copied";
- } catch {
- button.textContent = "Select it";
- }
- setTimeout(() => (button.textContent = "Copy"), 1600);
+ const was = button.innerHTML;
+ const done = await navigator.clipboard.writeText(text).then(() => "Copied", () => "Select it");
+ if (button.classList.contains("account-icon")) (button.innerHTML = glyph(CHECK)), say(done);
+ else button.textContent = done;
+ setTimeout(() => (button.innerHTML = was), 1600);
};
$("copy").addEventListener("click", () => copy($("copy"), held?.prism ?? ""));
diff --git a/identity/test.mjs b/identity/test.mjs
index a1df100..74df6f6 100644
--- a/identity/test.mjs
+++ b/identity/test.mjs
@@ -173,7 +173,7 @@ describe("the flow in Chromium", () => {
test("the icon sits after full screen, and nothing asks to sign in", async () => {
const order = await first.locator("prism-frame").evaluate((frame) => [...frame.shadowRoot.querySelector(".end").querySelectorAll("button")].map((b) => b.id));
assert.deepEqual(order.slice(-2), ["fullscreen", "account"]);
- assert.equal(await first.locator("#account").getAttribute("aria-label"), "Prism id");
+ assert.equal(await first.locator("#account").getAttribute("aria-label"), "Prism ID");
assert.equal(await first.locator("#account-panel").evaluate((panel) => panel.matches(":popover-open")), false);
assert.equal(await account(first), null);
});
@@ -187,7 +187,7 @@ describe("the flow in Chromium", () => {
assert.equal(await first.locator("#account-panel").evaluate((panel) => panel.matches(":popover-open")), false);
firstId = (await account(first)).id;
await first.locator("#account").click();
- assert.equal(await first.locator("#account-title").textContent(), "Prism id");
+ assert.equal(await first.locator("#account-title").textContent(), "Prism ID");
assert.equal(await first.getByText(/sign in/i).count(), 0);
assert.equal(relay.requests, asked);
const [download] = await Promise.all([first.waitForEvent("download"), first.locator("#account-kit-save").click()]);