@ofidj/generator-fidj 3.7.4 → 3.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {agreementMarkup, bindAgreement, acceptedAgreement, signInErrorMessage, providerEntry, rememberSignIn, forgetSignIn} from "./service-agreement";
|
|
1
|
+
import {agreementMarkup, bindAgreement, acceptedAgreement, signInErrorMessage, providerEntry, rememberSignIn, forgetSignIn, signInHint} from "./service-agreement";
|
|
2
2
|
import { FidjNodeService, FidjOidcClient } from "@ofidj/node";
|
|
3
3
|
import config from "../app.config.json";
|
|
4
4
|
import "./style.css";
|
|
@@ -414,6 +414,13 @@ function render() {
|
|
|
414
414
|
anonymous = true;
|
|
415
415
|
navigate("content");
|
|
416
416
|
});
|
|
417
|
+
// A remembered address is how the entry offers "Continue as <them>". Every
|
|
418
|
+
// sign-out this shell owns forgets it, because on a shared computer still
|
|
419
|
+
// being offered by name after leaving is the whole difference. A console that
|
|
420
|
+
// signs out through the SDK takes another path and forgot nothing, so the
|
|
421
|
+
// entry kept offering somebody who had left — the SDK records that this
|
|
422
|
+
// browser asked to be signed out, and that is the same statement.
|
|
423
|
+
if (oidc?.signedOutHere()) forgetSignIn(config.appId);
|
|
417
424
|
if (oidc && element("signin"))
|
|
418
425
|
element("signin")!.innerHTML = providerEntry(
|
|
419
426
|
config.title,
|
|
@@ -497,7 +504,18 @@ function render() {
|
|
|
497
504
|
return;
|
|
498
505
|
}
|
|
499
506
|
void action(async () => {
|
|
500
|
-
if (oidc && throughFidj) {
|
|
507
|
+
if (oidc && throughFidj) {
|
|
508
|
+
// "Continue as <them>" promises to carry on as that person, and handed
|
|
509
|
+
// them over to an empty email field — so the promise cost a second
|
|
510
|
+
// typing of the address it had just shown. The screen prefills from
|
|
511
|
+
// this, and nothing was writing it.
|
|
512
|
+
try {
|
|
513
|
+
const remembered = signInHint(config.appId);
|
|
514
|
+
if (remembered) sessionStorage.setItem("fidj.interaction.email", remembered);
|
|
515
|
+
} catch {}
|
|
516
|
+
window.location.assign(await oidc.beginLogin());
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
501
519
|
if (oidc && (!email || !password)) {
|
|
502
520
|
throw new Error("Enter your email and password, or sign in with Fidj.");
|
|
503
521
|
}
|