@ofidj/generator-fidj 1.7.0 → 1.7.1

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.
@@ -293,8 +293,13 @@ function render() {
293
293
  return;
294
294
  }
295
295
  // The provider handed this person here to answer a question. Nothing else
296
- // this app might want to show belongs on the screen until they have.
296
+ // this app might want to show belongs on the screen until they have — the
297
+ // shell's own header and page margins included: chrome that says "you are
298
+ // inside the console" reads as furniture from the wrong room above a question
299
+ // about whether you are anyone at all. Same class the shell's other
300
+ // standalone screens use, so one rule keeps covering them all.
297
301
  if (interactionId) {
302
+ document.body.classList.add("signin-view");
298
303
  if (interactionFailed) {
299
304
  root.innerHTML = `<section class="card"><p role="alert" class="error">${escape(message)}</p><p><a href="#/signin">Back to sign in</a></p></section>`;
300
305
  return;
@@ -733,7 +738,7 @@ function interactionScreen() {
733
738
  <label class="agreement-choice"><input type="checkbox" name="terms" value="true" required><span>I accept ${asking}'s service agreement.</span></label>
734
739
  ${details.termsUri ? `<p class="fineprint"><a href="${escape(details.termsUri)}" target="_blank" rel="noopener noreferrer">Service agreement</a>${details.privacyUri ? ` · <a href="${escape(details.privacyUri)}" target="_blank" rel="noopener noreferrer">Privacy notice</a>` : ""}</p>` : ""}
735
740
  <button class="primary" type="submit" name="action" value="continue">Allow and continue</button>
736
- <button type="button" id="not-me" class="quiet">Not you? Sign in with another account</button>
741
+ <button class="quiet" type="submit" id="not-me" name="action" value="switch" formnovalidate>Not you? Sign in with another account</button>
737
742
  <button class="quiet" type="submit" name="action" value="cancel" formnovalidate>Cancel and go back</button>
738
743
  </form>`;
739
744
 
@@ -754,16 +759,16 @@ function interactionScreen() {
754
759
  });
755
760
  // Being recognised is the point, and a dead end when the person is not who
756
761
  // Fidj thinks — a shared computer, a second account, somebody else's tab. So
757
- // the screen that recognises them asks again on request, which is what
758
- // prompt=login means, rather than merely forgetting a remembered address.
762
+ // the screen that recognises them asks again on request. It goes back to the
763
+ // provider as this form's own answer, because only the provider can end the
764
+ // session doing the recognising: starting a fresh request with prompt=login
765
+ // from here asked once and left that session standing, so the back button,
766
+ // a reload, or the app's door again met the same face.
759
767
  element("not-me")?.addEventListener("click", () => {
760
768
  forgetSignIn(config.appId);
761
769
  try {
762
770
  sessionStorage.removeItem("fidj.interaction.email");
763
771
  } catch {}
764
- void (async () => {
765
- window.location.assign(await oidc!.beginLogin({prompt: "login"}));
766
- })();
767
772
  });
768
773
  element("interaction")?.addEventListener("submit", () => {
769
774
  const address = element<HTMLInputElement>("email")?.value || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ofidj/generator-fidj",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Generate a TypeScript app with Fidj sign-in, live server-side roles and per-app privacy.",
5
5
  "homepage": "https://fidj.ovh",
6
6
  "bugs": {