@stackframe/js 2.8.47 → 2.8.48

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @stackframe/stack
2
2
 
3
+ ## 2.8.48
4
+
5
+ ### Patch Changes
6
+
7
+ - Various changes
8
+ - Updated dependencies
9
+ - @stackframe/stack-shared@2.8.48
10
+ - @stackframe/stack-ui@2.8.48
11
+ - @stackframe/stack-sc@2.8.48
12
+
3
13
  ## 2.8.47
4
14
 
5
15
  ### Patch Changes
@@ -8,6 +8,12 @@ function getConvexProvidersConfig(options) {
8
8
  {
9
9
  type: "customJwt",
10
10
  issuer: new URL(urlString`/api/v1/projects/${projectId}`, baseUrl),
11
+ jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json`, baseUrl),
12
+ algorithm: "ES256"
13
+ },
14
+ {
15
+ type: "customJwt",
16
+ issuer: new URL(urlString`/api/v1/projects-anonymous-users/${projectId}`, baseUrl),
11
17
  jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json?include_anonymous=true`, baseUrl),
12
18
  algorithm: "ES256"
13
19
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/integrations/convex.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { urlString } from \"@stackframe/stack-shared/dist/utils/urls\";\nimport { defaultBaseUrl } from \"../lib/stack-app/apps/implementations/common\";\n\nexport function getConvexProvidersConfig(options: {\n baseUrl?: string,\n projectId: string,\n}) {\n const baseUrl = options.baseUrl || defaultBaseUrl;\n const projectId = options.projectId;\n return [\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json?include_anonymous=true`, baseUrl),\n algorithm: \"ES256\",\n },\n ];\n}\n"],"mappings":";AAIA,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAExB,SAAS,yBAAyB,SAGtC;AACD,QAAM,UAAU,QAAQ,WAAW;AACnC,QAAM,YAAY,QAAQ;AAC1B,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,QAAQ,IAAI,IAAI,6BAA6B,SAAS,IAAI,OAAO;AAAA,MACjE,MAAM,IAAI,IAAI,6BAA6B,SAAS,iDAAiD,OAAO;AAAA,MAC5G,WAAW;AAAA,IACb;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/integrations/convex.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { urlString } from \"@stackframe/stack-shared/dist/utils/urls\";\nimport { defaultBaseUrl } from \"../lib/stack-app/apps/implementations/common\";\n\nexport function getConvexProvidersConfig(options: {\n baseUrl?: string,\n projectId: string,\n}) {\n const baseUrl = options.baseUrl || defaultBaseUrl;\n const projectId = options.projectId;\n return [\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json`, baseUrl),\n algorithm: \"ES256\",\n },\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects-anonymous-users/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json?include_anonymous=true`, baseUrl),\n algorithm: \"ES256\",\n },\n ];\n}\n"],"mappings":";AAIA,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAExB,SAAS,yBAAyB,SAGtC;AACD,QAAM,UAAU,QAAQ,WAAW;AACnC,QAAM,YAAY,QAAQ;AAC1B,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,QAAQ,IAAI,IAAI,6BAA6B,SAAS,IAAI,OAAO;AAAA,MACjE,MAAM,IAAI,IAAI,6BAA6B,SAAS,0BAA0B,OAAO;AAAA,MACrF,WAAW;AAAA,IACb;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,QAAQ,IAAI,IAAI,6CAA6C,SAAS,IAAI,OAAO;AAAA,MACjF,MAAM,IAAI,IAAI,6BAA6B,SAAS,iDAAiD,OAAO;AAAA,MAC5G,WAAW;AAAA,IACb;AAAA,EACF;AACF;","names":[]}
@@ -1350,15 +1350,28 @@ var __StackClientAppImplIncomplete = class __StackClientAppImplIncomplete {
1350
1350
  }
1351
1351
  }
1352
1352
  async signUpWithCredential(options) {
1353
+ if (options.noVerificationCallback && options.verificationCallbackUrl) {
1354
+ throw new StackAssertionError("verificationCallbackUrl is not allowed when noVerificationCallback is true");
1355
+ }
1353
1356
  this._ensurePersistentTokenStore();
1354
1357
  const session = await this._getSession();
1355
- const emailVerificationRedirectUrl = options.verificationCallbackUrl ?? constructRedirectUrl(this.urls.emailVerification, "verificationCallbackUrl");
1356
- const result = await this._interface.signUpWithCredential(
1358
+ const emailVerificationRedirectUrl = options.noVerificationCallback ? void 0 : options.verificationCallbackUrl ?? constructRedirectUrl(this.urls.emailVerification, "verificationCallbackUrl");
1359
+ let result = await this._interface.signUpWithCredential(
1357
1360
  options.email,
1358
1361
  options.password,
1359
1362
  emailVerificationRedirectUrl,
1360
1363
  session
1361
1364
  );
1365
+ if (result.status === "error" && result.error instanceof KnownErrors.RedirectUrlNotWhitelisted && !options.noVerificationCallback && emailVerificationRedirectUrl !== void 0) {
1366
+ console.error("Warning: The verification callback URL is not trusted. Proceeding with signup without email verification. Please add your domain to the trusted domains list in your Stack Auth dashboard.", { url: emailVerificationRedirectUrl });
1367
+ result = await this._interface.signUpWithCredential(
1368
+ options.email,
1369
+ options.password,
1370
+ void 0,
1371
+ // No email verification
1372
+ session
1373
+ );
1374
+ }
1362
1375
  if (result.status === "ok") {
1363
1376
  await this._signInToAccountWithTokens(result.data);
1364
1377
  if (!options.noRedirect) {