zudoku 0.3.0-dev.72 → 0.3.0-dev.73

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.
@@ -7,6 +7,7 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
7
7
  isPending: false,
8
8
  profile: undefined,
9
9
  });
10
+ localStorage.removeItem("auto-login");
10
11
  const as = await this.getAuthServer();
11
12
  const redirectUrl = new URL(window.location.origin + this.logoutRedirectUrlPath);
12
13
  redirectUrl.pathname = this.logoutRedirectUrlPath;
@@ -1 +1 @@
1
- {"version":3,"file":"auth0.js","sourceRoot":"","sources":["../../../../src/lib/authentication/providers/auth0.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,2BAA4B,SAAQ,4BAA4B;IACpE,OAAO,GAAG,KAAK,IAAmB,EAAE;QAClC,YAAY,CAAC,QAAQ,CAAC;YACpB,eAAe,EAAE,KAAK;YACtB,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,SAAS;SACnB,CAAC,CAAC;QACH,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAEtC,MAAM,WAAW,GAAG,IAAI,GAAG,CACzB,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CACpD,CAAC;QACF,WAAW,CAAC,QAAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAElD,+EAA+E;QAC/E,uEAAuE;QACvE,+DAA+D;QAC/D,wDAAwD;QAExD,IAAI,SAAc,CAAC;QACnB,uEAAuE;QACvE,sEAAsE;QACtE,IAAI,EAAE,CAAC,oBAAoB,EAAE,CAAC;YAC5B,SAAS,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;YAC7C,kCAAkC;YAClC,gCAAgC;YAChC,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C;QACnB,uEAAuE;QACvE,sEAAsE;QACtE,IAAI,EAAE,CAAC,oBAAoB,EAAE,CAAC;YAC5B,SAAS,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;YAC7C,kCAAkC;YAClC,gCAAgC;YAChC,kBAAkB;YAClB,2DAA2D;YAC3D,IAAI;YACJ,SAAS,CAAC,YAAY,CAAC,GAAG,CACxB,0BAA0B,EAC1B,WAAW,CAAC,QAAQ,EAAE,CACvB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,aAAa,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC;CACH;AAED,MAAM,SAAS,GAEX,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAC7B,IAAI,2BAA2B,CAAC;IAC9B,GAAG,OAAO;IACV,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,WAAW,MAAM,EAAE;CAC5B,CAAC,CAAC;AAEL,eAAe,SAAS,CAAC"}
@@ -1,9 +1,9 @@
1
1
  var r = Object.defineProperty;
2
- var a = (e, t, i) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var n = (e, t, i) => a(e, typeof t != "symbol" ? t + "" : t, i);
2
+ var a = (e, t, o) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var n = (e, t, o) => a(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import { u } from "./state-DsXXkBLH.js";
5
- import { OpenIDAuthenticationProvider as d } from "./zudoku.auth-openid.js";
6
- class h extends d {
5
+ import { OpenIDAuthenticationProvider as l } from "./zudoku.auth-openid.js";
6
+ class d extends l {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  n(this, "signOut", async () => {
@@ -11,25 +11,25 @@ class h extends d {
11
11
  isAuthenticated: !1,
12
12
  isPending: !1,
13
13
  profile: void 0
14
- });
15
- const i = await this.getAuthServer(), o = new URL(
14
+ }), localStorage.removeItem("auto-login");
15
+ const o = await this.getAuthServer(), s = new URL(
16
16
  window.location.origin + this.logoutRedirectUrlPath
17
17
  );
18
- o.pathname = this.logoutRedirectUrlPath;
19
- let s;
20
- i.end_session_endpoint ? (s = new URL(i.end_session_endpoint), s.searchParams.set(
18
+ s.pathname = this.logoutRedirectUrlPath;
19
+ let i;
20
+ o.end_session_endpoint ? (i = new URL(o.end_session_endpoint), i.searchParams.set(
21
21
  "post_logout_redirect_uri",
22
- o.toString()
23
- )) : s = new URL(`${this.issuer}oidc/logout`);
22
+ s.toString()
23
+ )) : i = new URL(`${this.issuer}oidc/logout`);
24
24
  });
25
25
  }
26
26
  }
27
- const g = ({ domain: e, ...t }) => new h({
27
+ const p = ({ domain: e, ...t }) => new d({
28
28
  ...t,
29
29
  type: "openid",
30
30
  issuer: `https://${e}`
31
31
  });
32
32
  export {
33
- g as default
33
+ p as default
34
34
  };
35
35
  //# sourceMappingURL=zudoku.auth-auth0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zudoku.auth-auth0.js","sources":["../src/lib/authentication/providers/auth0.tsx"],"sourcesContent":["import { Auth0AuthenticationConfig } from \"../../../config/config.js\";\nimport { AuthenticationProviderInitializer } from \"../authentication.js\";\nimport { useAuthState } from \"../state.js\";\nimport { OpenIDAuthenticationProvider } from \"./openid.js\";\n\nclass Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {\n signOut = async (): Promise<void> => {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n const as = await this.getAuthServer();\n\n const redirectUrl = new URL(\n window.location.origin + this.logoutRedirectUrlPath,\n );\n redirectUrl.pathname = this.logoutRedirectUrlPath;\n\n // SEE: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0\n // For Auth0 tenants created on or after 14 November 2023, RP-Initiated\n // Logout End Session Endpoint Discovery is enabled by default.\n // Otherwise we fallback to the old non-compliant logout\n\n let logoutUrl: URL;\n // The endSessionEndpoint is set, the IdP supports some form of logout,\n // so we use the IdP logout. Otherwise, just redirect the user to home\n if (as.end_session_endpoint) {\n logoutUrl = new URL(as.end_session_endpoint);\n // TODO: get id_token and set hint\n // const { id_token } = session;\n // if (id_token) {\n // logoutUrl.searchParams.set(\"id_token_hint\", id_token);\n // }\n logoutUrl.searchParams.set(\n \"post_logout_redirect_uri\",\n redirectUrl.toString(),\n );\n } else {\n logoutUrl = new URL(`${this.issuer}oidc/logout`);\n }\n };\n}\n\nconst auth0Auth: AuthenticationProviderInitializer<\n Auth0AuthenticationConfig\n> = ({ domain, ...options }) =>\n new Auth0AuthenticationProvider({\n ...options,\n type: \"openid\",\n issuer: `https://${domain}`,\n });\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","__publicField","useAuthState","as","redirectUrl","logoutUrl","auth0Auth","domain","options"],"mappings":";;;;;AAKA,MAAMA,UAAoCC,EAA6B;AAAA,EAAvE;AAAA;AACE,IAAAC,EAAA,iBAAU,YAA2B;AACnC,MAAAC,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACV;AACK,YAAAC,IAAK,MAAM,KAAK,iBAEhBC,IAAc,IAAI;AAAA,QACtB,OAAO,SAAS,SAAS,KAAK;AAAA,MAAA;AAEhC,MAAAA,EAAY,WAAW,KAAK;AAOxB,UAAAC;AAGJ,MAAIF,EAAG,wBACOE,IAAA,IAAI,IAAIF,EAAG,oBAAoB,GAM3CE,EAAU,aAAa;AAAA,QACrB;AAAA,QACAD,EAAY,SAAS;AAAA,MAAA,KAGvBC,IAAY,IAAI,IAAI,GAAG,KAAK,MAAM,aAAa;AAAA,IACjD;AAAA;AAEJ;AAEM,MAAAC,IAEF,CAAC,EAAE,QAAAC,GAAQ,GAAGC,EAAQ,MACxB,IAAIT,EAA4B;AAAA,EAC9B,GAAGS;AAAA,EACH,MAAM;AAAA,EACN,QAAQ,WAAWD,CAAM;AAC3B,CAAC;"}
1
+ {"version":3,"file":"zudoku.auth-auth0.js","sources":["../src/lib/authentication/providers/auth0.tsx"],"sourcesContent":["import { Auth0AuthenticationConfig } from \"../../../config/config.js\";\nimport { AuthenticationProviderInitializer } from \"../authentication.js\";\nimport { useAuthState } from \"../state.js\";\nimport { OpenIDAuthenticationProvider } from \"./openid.js\";\n\nclass Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {\n signOut = async (): Promise<void> => {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n localStorage.removeItem(\"auto-login\");\n const as = await this.getAuthServer();\n\n const redirectUrl = new URL(\n window.location.origin + this.logoutRedirectUrlPath,\n );\n redirectUrl.pathname = this.logoutRedirectUrlPath;\n\n // SEE: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0\n // For Auth0 tenants created on or after 14 November 2023, RP-Initiated\n // Logout End Session Endpoint Discovery is enabled by default.\n // Otherwise we fallback to the old non-compliant logout\n\n let logoutUrl: URL;\n // The endSessionEndpoint is set, the IdP supports some form of logout,\n // so we use the IdP logout. Otherwise, just redirect the user to home\n if (as.end_session_endpoint) {\n logoutUrl = new URL(as.end_session_endpoint);\n // TODO: get id_token and set hint\n // const { id_token } = session;\n // if (id_token) {\n // logoutUrl.searchParams.set(\"id_token_hint\", id_token);\n // }\n logoutUrl.searchParams.set(\n \"post_logout_redirect_uri\",\n redirectUrl.toString(),\n );\n } else {\n logoutUrl = new URL(`${this.issuer}oidc/logout`);\n }\n };\n}\n\nconst auth0Auth: AuthenticationProviderInitializer<\n Auth0AuthenticationConfig\n> = ({ domain, ...options }) =>\n new Auth0AuthenticationProvider({\n ...options,\n type: \"openid\",\n issuer: `https://${domain}`,\n });\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","__publicField","useAuthState","as","redirectUrl","logoutUrl","auth0Auth","domain","options"],"mappings":";;;;;AAKA,MAAMA,UAAoCC,EAA6B;AAAA,EAAvE;AAAA;AACE,IAAAC,EAAA,iBAAU,YAA2B;AACnC,MAAAC,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACV,GACD,aAAa,WAAW,YAAY;AAC9B,YAAAC,IAAK,MAAM,KAAK,iBAEhBC,IAAc,IAAI;AAAA,QACtB,OAAO,SAAS,SAAS,KAAK;AAAA,MAAA;AAEhC,MAAAA,EAAY,WAAW,KAAK;AAOxB,UAAAC;AAGJ,MAAIF,EAAG,wBACOE,IAAA,IAAI,IAAIF,EAAG,oBAAoB,GAM3CE,EAAU,aAAa;AAAA,QACrB;AAAA,QACAD,EAAY,SAAS;AAAA,MAAA,KAGvBC,IAAY,IAAI,IAAI,GAAG,KAAK,MAAM,aAAa;AAAA,IACjD;AAAA;AAEJ;AAEM,MAAAC,IAEF,CAAC,EAAE,QAAAC,GAAQ,GAAGC,EAAQ,MACxB,IAAIT,EAA4B;AAAA,EAC9B,GAAGS;AAAA,EACH,MAAM;AAAA,EACN,QAAQ,WAAWD,CAAM;AAC3B,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.0-dev.72",
3
+ "version": "0.3.0-dev.73",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -10,6 +10,7 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
10
10
  isPending: false,
11
11
  profile: undefined,
12
12
  });
13
+ localStorage.removeItem("auto-login");
13
14
  const as = await this.getAuthServer();
14
15
 
15
16
  const redirectUrl = new URL(