@crossauth/sveltekit 1.1.7 → 1.1.9

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.
@@ -45,7 +45,7 @@ export class SvelteKitApiKeyServer {
45
45
  const key = await this.apiKeyManager.validateToken(authzHeader);
46
46
  CrossauthLogger.logger.debug(j({
47
47
  msg: "Valid API key",
48
- hahedApiKey: ApiKeyManager.hashSignedApiKeyValue(key.value)
48
+ hashedApiKey: ApiKeyManager.hashSignedApiKeyValue(key.value)
49
49
  }));
50
50
  const data = KeyStorage.decodeData(key.data);
51
51
  event.locals.apiKey = { ...key, ...data };
@@ -62,7 +62,7 @@ export class SvelteKitApiKeyServer {
62
62
  const { user } = await this.userStorage.getUserById(key.userid);
63
63
  event.locals.user = user;
64
64
  event.locals.authType = "apiKey";
65
- CrossauthLogger.logger.debug(j({ msg: "API key is for user", userid: user.id, user: user.username, hahedApiKey: ApiKeyManager.hashSignedApiKeyValue(key.value) }));
65
+ CrossauthLogger.logger.debug(j({ msg: "API key is for user", userid: user.id, user: user.username, hashedApiKey: ApiKeyManager.hashSignedApiKeyValue(key.value) }));
66
66
  }
67
67
  catch (e2) {
68
68
  CrossauthLogger.logger.error(j({ msg: "API key has invalid user", userid: key.userid, hashedApiKey: ApiKeyManager.hashSignedApiKeyValue(key.value) }));
@@ -1531,7 +1531,7 @@ export class SvelteKitOAuthClient extends OAuthClientBackend {
1531
1531
  }
1532
1532
  // the following call returns a constructed url for the
1533
1533
  // auth server's /authorize endpoint
1534
- const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, upstream });
1534
+ const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope });
1535
1535
  if (error || !url) {
1536
1536
  const ce = CrossauthError.fromOAuthError(error ?? "server_error", error_description);
1537
1537
  return await this.errorFn(this.server, event, ce);
@@ -1602,7 +1602,7 @@ export class SvelteKitOAuthClient extends OAuthClientBackend {
1602
1602
  }
1603
1603
  // the following call returns a constructed url for the
1604
1604
  // auth server's /authorize endpoint
1605
- const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, upstream });
1605
+ const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope });
1606
1606
  if (error || !url) {
1607
1607
  const ce = CrossauthError.fromOAuthError(error ?? "server_error", error_description);
1608
1608
  return {
@@ -1672,7 +1672,7 @@ export class SvelteKitOAuthClient extends OAuthClientBackend {
1672
1672
  }
1673
1673
  // the following call returns a constructed url for the
1674
1674
  // auth server's /authorize endpoint
1675
- const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, codeChallenge, pkce: true, upstream });
1675
+ const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, codeChallenge, pkce: true });
1676
1676
  if (error || !url) {
1677
1677
  const ce = CrossauthError.fromOAuthError(error ?? "server_error", error_description);
1678
1678
  return await this.errorFn(this.server, event, ce);
@@ -1743,7 +1743,7 @@ export class SvelteKitOAuthClient extends OAuthClientBackend {
1743
1743
  }
1744
1744
  // the following call returns a constructed url for the
1745
1745
  // auth server's /authorize endpoint
1746
- const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, codeChallenge, pkce: true, upstream });
1746
+ const { url, error, error_description } = await this.startAuthorizationCodeFlow(state, { scope, codeChallenge, pkce: true });
1747
1747
  if (error || !url) {
1748
1748
  const ce = CrossauthError.fromOAuthError(error ?? "server_error", error_description);
1749
1749
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossauth/sveltekit",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Sveltekit adapter for Crossauth authentication package",
6
6
  "private": false,
@@ -54,8 +54,8 @@
54
54
  "minimatch": "^10.0.1",
55
55
  "publint": "0.3.15",
56
56
  "qrcode": "^1.5.4",
57
- "@crossauth/backend": "^1.1.7",
58
- "@crossauth/common": "^1.1.7"
57
+ "@crossauth/backend": "^1.1.9",
58
+ "@crossauth/common": "^1.1.9"
59
59
  },
60
60
  "scripts": {
61
61
  "preparex": "svelte-kit sync",