@echoxyz/sonar-react 0.8.0 → 0.9.0

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,16 @@
1
1
  # @echoxyz/sonar-react
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f1c6ddd: Added refresh token endpoint. Aligned to new response type shapes.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [f1c6ddd]
12
+ - @echoxyz/sonar-core@0.8.0
13
+
3
14
  ## 0.8.0
4
15
 
5
16
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -75,12 +75,12 @@ function SonarProvider({ children, config }) {
75
75
  if (state !== expectedState || !codeVerifier) {
76
76
  throw new Error("Invalid OAuth state or missing verifier");
77
77
  }
78
- const { token } = await client.exchangeAuthorizationCode({
78
+ const { access_token } = await client.exchangeAuthorizationCode({
79
79
  code,
80
80
  codeVerifier,
81
81
  redirectURI: config.redirectURI
82
82
  });
83
- client.setToken(token);
83
+ client.setToken(access_token);
84
84
  window.sessionStorage.removeItem("sonar:oauth:state");
85
85
  window.sessionStorage.removeItem("sonar:oauth:verifier");
86
86
  },
package/dist/index.js CHANGED
@@ -44,12 +44,12 @@ function SonarProvider({ children, config }) {
44
44
  if (state !== expectedState || !codeVerifier) {
45
45
  throw new Error("Invalid OAuth state or missing verifier");
46
46
  }
47
- const { token } = await client.exchangeAuthorizationCode({
47
+ const { access_token } = await client.exchangeAuthorizationCode({
48
48
  code,
49
49
  codeVerifier,
50
50
  redirectURI: config.redirectURI
51
51
  });
52
- client.setToken(token);
52
+ client.setToken(access_token);
53
53
  window.sessionStorage.removeItem("sonar:oauth:state");
54
54
  window.sessionStorage.removeItem("sonar:oauth:verifier");
55
55
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-react",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "react": ">=18"
17
17
  },
18
18
  "dependencies": {
19
- "@echoxyz/sonar-core": "0.7.0"
19
+ "@echoxyz/sonar-core": "0.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@testing-library/react": "^16.0.0",