Welcome back
+{challenge ? "Two-factor authentication" : "Welcome back"}
- Your password never leaves your device. + {challenge + ? "Enter the code from your authenticator app, or one of your recovery codes." + : "Your password never leaves your device."}
+ {challenge ? ( + + ) : ( + )}
diff --git a/portal/lib/api.ts b/portal/lib/api.ts
index f923c53..41df15f 100644
--- a/portal/lib/api.ts
+++ b/portal/lib/api.ts
@@ -8,6 +8,16 @@ export class ApiError extends Error {
super(message);
this.name = "ApiError";
}
+
+ /** The `{"error": CODE, ...}` body the server sends with a refusal it wants told apart. */
+ get body(): Record