zudoku 0.15.0 → 0.15.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.
@@ -11,6 +11,7 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
11
11
  });
12
12
  }
13
13
  onAuthorizationUrl = async (url, { isSignUp }) => {
14
+ url.searchParams.set("prompt", "login");
14
15
  if (isSignUp) {
15
16
  url.searchParams.set("screen_hint", "signup");
16
17
  }
@@ -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,YAAY,MAAiC;QAC3C,KAAK,CAAC;YACJ,GAAG,MAAM;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW,MAAM,CAAC,MAAM,EAAE;YAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,GAAG,KAAK,EACxB,GAAQ,EACR,EAAE,QAAQ,EAAyB,EACnC,EAAE;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC;IAEF,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,cAAc,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAE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AAC;QACnD,CAAC;IACH,CAAC,CAAC;CACH;AAED,MAAM,SAAS,GAEX,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAC;AAE1D,eAAe,SAAS,CAAC"}
@@ -2,8 +2,8 @@ var r = Object.defineProperty;
2
2
  var a = (e, s, t) => s in e ? r(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
3
3
  var o = (e, s, t) => a(e, typeof s != "symbol" ? s + "" : s, t);
4
4
  import { u } from "./state-CsuHT8ZO.js";
5
- import { OpenIDAuthenticationProvider as d } from "./zudoku.auth-openid.js";
6
- class c extends d {
5
+ import { OpenIDAuthenticationProvider as c } from "./zudoku.auth-openid.js";
6
+ class d extends c {
7
7
  constructor(t) {
8
8
  super({
9
9
  ...t,
@@ -13,7 +13,7 @@ class c extends d {
13
13
  audience: t.audience
14
14
  });
15
15
  o(this, "onAuthorizationUrl", async (t, { isSignUp: i }) => {
16
- i && t.searchParams.set("screen_hint", "signup");
16
+ t.searchParams.set("prompt", "login"), i && t.searchParams.set("screen_hint", "signup");
17
17
  });
18
18
  o(this, "signOut", async () => {
19
19
  u.setState({
@@ -33,7 +33,7 @@ class c extends d {
33
33
  });
34
34
  }
35
35
  }
36
- const g = (e) => new c(e);
36
+ const g = (e) => new d(e);
37
37
  export {
38
38
  g as default
39
39
  };
@@ -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 constructor(config: Auth0AuthenticationConfig) {\n super({\n ...config,\n type: \"openid\",\n issuer: `https://${config.domain}`,\n clientId: config.clientId,\n audience: config.audience,\n });\n }\n\n onAuthorizationUrl = async (\n url: URL,\n { isSignUp }: { isSignUp: boolean },\n ) => {\n if (isSignUp) {\n url.searchParams.set(\"screen_hint\", \"signup\");\n }\n };\n\n signOut = async (): Promise<void> => {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n sessionStorage.clear();\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> = (options) => new Auth0AuthenticationProvider(options);\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","config","__publicField","url","isSignUp","useAuthState","as","redirectUrl","logoutUrl","auth0Auth","options"],"mappings":";;;;;AAKA,MAAMA,UAAoCC,EAA6B;AAAA,EACrE,YAAYC,GAAmC;AACvC,UAAA;AAAA,MACJ,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,QAAQ,WAAWA,EAAO,MAAM;AAAA,MAChC,UAAUA,EAAO;AAAA,MACjB,UAAUA,EAAO;AAAA,IAAA,CAClB;AAGH,IAAAC,EAAA,4BAAqB,OACnBC,GACA,EAAE,UAAAC,QACC;AACH,MAAIA,KACED,EAAA,aAAa,IAAI,eAAe,QAAQ;AAAA,IAC9C;AAGF,IAAAD,EAAA,iBAAU,YAA2B;AACnC,MAAAG,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACV,GACD,eAAe,MAAM;AACf,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,EA9CF;AAgDF;AAEA,MAAMC,IAEF,CAACC,MAAY,IAAIX,EAA4BW,CAAO;"}
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 constructor(config: Auth0AuthenticationConfig) {\n super({\n ...config,\n type: \"openid\",\n issuer: `https://${config.domain}`,\n clientId: config.clientId,\n audience: config.audience,\n });\n }\n\n onAuthorizationUrl = async (\n url: URL,\n { isSignUp }: { isSignUp: boolean },\n ) => {\n url.searchParams.set(\"prompt\", \"login\");\n if (isSignUp) {\n url.searchParams.set(\"screen_hint\", \"signup\");\n }\n };\n\n signOut = async (): Promise<void> => {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n sessionStorage.clear();\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> = (options) => new Auth0AuthenticationProvider(options);\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","config","__publicField","url","isSignUp","useAuthState","as","redirectUrl","logoutUrl","auth0Auth","options"],"mappings":";;;;;AAKA,MAAMA,UAAoCC,EAA6B;AAAA,EACrE,YAAYC,GAAmC;AACvC,UAAA;AAAA,MACJ,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,QAAQ,WAAWA,EAAO,MAAM;AAAA,MAChC,UAAUA,EAAO;AAAA,MACjB,UAAUA,EAAO;AAAA,IAAA,CAClB;AAGH,IAAAC,EAAA,4BAAqB,OACnBC,GACA,EAAE,UAAAC,QACC;AACC,MAAAD,EAAA,aAAa,IAAI,UAAU,OAAO,GAClCC,KACED,EAAA,aAAa,IAAI,eAAe,QAAQ;AAAA,IAC9C;AAGF,IAAAD,EAAA,iBAAU,YAA2B;AACnC,MAAAG,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACV,GACD,eAAe,MAAM;AACf,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,EA/CF;AAiDF;AAEA,MAAMC,IAEF,CAACC,MAAY,IAAIX,EAA4BW,CAAO;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
@@ -123,7 +123,7 @@
123
123
  "@radix-ui/react-popover": "1.1.2",
124
124
  "@radix-ui/react-progress": "1.1.0",
125
125
  "@radix-ui/react-radio-group": "1.2.1",
126
- "@radix-ui/react-scroll-area": "1.2.0",
126
+ "@radix-ui/react-scroll-area": "1.2.1",
127
127
  "@radix-ui/react-select": "2.1.2",
128
128
  "@radix-ui/react-slider": "1.2.1",
129
129
  "@radix-ui/react-slot": "1.1.0",
@@ -141,7 +141,7 @@
141
141
  "@types/react": "18.3.11",
142
142
  "@types/react-dom": "18.3.1",
143
143
  "@vitejs/plugin-react": "4.3.1",
144
- "@zudoku/config": "0.15.0",
144
+ "@zudoku/config": "0.15.1",
145
145
  "@zudoku/httpsnippet": "10.0.9",
146
146
  "@zudoku/react-helmet-async": "2.0.4",
147
147
  "autoprefixer": "10.4.20",
@@ -18,6 +18,7 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
18
18
  url: URL,
19
19
  { isSignUp }: { isSignUp: boolean },
20
20
  ) => {
21
+ url.searchParams.set("prompt", "login");
21
22
  if (isSignUp) {
22
23
  url.searchParams.set("screen_hint", "signup");
23
24
  }