@privy-io/js-sdk-core 0.9.2 → 0.9.3-beta-20240112172343

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/dist/index.js CHANGED
@@ -2048,16 +2048,26 @@ class $4a5ceffc04a8e7b0$export$1fb4852a55678982 {
2048
2048
  async storeRefreshToken(refreshToken) {
2049
2049
  if (typeof refreshToken === "string") {
2050
2050
  await this.#storage.put($4a5ceffc04a8e7b0$var$REFRESH_TOKEN_STORAGE_KEY, refreshToken);
2051
- if (!this.#isUsingServerCookies) (0, ($parcel$interopDefault($bwzhE$jscookie))).set($4a5ceffc04a8e7b0$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
2052
- sameSite: "Strict",
2053
- secure: true,
2054
- // Note! This is capped to 7 days on Safari and Brave:
2055
- // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2056
- expires: 30
2057
- });
2051
+ if (!this.#isUsingServerCookies) {
2052
+ (0, ($parcel$interopDefault($bwzhE$jscookie))).set($4a5ceffc04a8e7b0$var$SESSION_COOKIE_KEY, "t", {
2053
+ sameSite: "Strict",
2054
+ secure: true,
2055
+ // Note! This is capped to 7 days on Safari and Brave:
2056
+ // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2057
+ expires: 30
2058
+ });
2059
+ (0, ($parcel$interopDefault($bwzhE$jscookie))).set($4a5ceffc04a8e7b0$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
2060
+ sameSite: "Strict",
2061
+ secure: true,
2062
+ // Note! This is capped to 7 days on Safari and Brave:
2063
+ // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2064
+ expires: 30
2065
+ });
2066
+ }
2058
2067
  } else {
2059
2068
  await this.#storage.del($4a5ceffc04a8e7b0$var$REFRESH_TOKEN_STORAGE_KEY);
2060
2069
  (0, ($parcel$interopDefault($bwzhE$jscookie))).remove($4a5ceffc04a8e7b0$var$REFRESH_TOKEN_COOKIE_KEY);
2070
+ (0, ($parcel$interopDefault($bwzhE$jscookie))).remove($4a5ceffc04a8e7b0$var$SESSION_COOKIE_KEY);
2061
2071
  }
2062
2072
  }
2063
2073
  async clearForkedToken() {
package/dist/index.mjs CHANGED
@@ -2015,16 +2015,26 @@ class $0b6eb30d38bf8477$export$1fb4852a55678982 {
2015
2015
  async storeRefreshToken(refreshToken) {
2016
2016
  if (typeof refreshToken === "string") {
2017
2017
  await this.#storage.put($0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY, refreshToken);
2018
- if (!this.#isUsingServerCookies) (0, $kxB2R$jscookie).set($0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
2019
- sameSite: "Strict",
2020
- secure: true,
2021
- // Note! This is capped to 7 days on Safari and Brave:
2022
- // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2023
- expires: 30
2024
- });
2018
+ if (!this.#isUsingServerCookies) {
2019
+ (0, $kxB2R$jscookie).set($0b6eb30d38bf8477$var$SESSION_COOKIE_KEY, "t", {
2020
+ sameSite: "Strict",
2021
+ secure: true,
2022
+ // Note! This is capped to 7 days on Safari and Brave:
2023
+ // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2024
+ expires: 30
2025
+ });
2026
+ (0, $kxB2R$jscookie).set($0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
2027
+ sameSite: "Strict",
2028
+ secure: true,
2029
+ // Note! This is capped to 7 days on Safari and Brave:
2030
+ // https://github.com/js-cookie/js-cookie/issues/627#issuecomment-626144237
2031
+ expires: 30
2032
+ });
2033
+ }
2025
2034
  } else {
2026
2035
  await this.#storage.del($0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY);
2027
2036
  (0, $kxB2R$jscookie).remove($0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY);
2037
+ (0, $kxB2R$jscookie).remove($0b6eb30d38bf8477$var$SESSION_COOKIE_KEY);
2028
2038
  }
2029
2039
  }
2030
2040
  async clearForkedToken() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/js-sdk-core",
3
- "version": "0.9.2",
3
+ "version": "0.9.3-beta-20240112172343",
4
4
  "description": "Vanilla JS client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@ethersproject/providers": "^5.7.2",
63
- "@privy-io/public-api": "1.4.4",
63
+ "@privy-io/public-api": "1.5.0-beta-20240112172343",
64
64
  "eventemitter3": "^5.0.1",
65
65
  "fetch-retry": "^5.0.6",
66
66
  "jose": "^4.11.2",