Skip to content

Commit 5b04ea8

Browse files
authored
Merge pull request #348 from PagerDuty/release/0.11.0-beta.0
2 parents 3b31516 + 8349395 commit 5b04ea8

File tree

7 files changed

+310
-416
lines changed

7 files changed

+310
-416
lines changed

.github/workflows/cd-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@v4
43-
- uses: actions/setup-node@v3
43+
- uses: actions/setup-node@v4
4444
with:
4545
node-version-file: .tool-versions
4646
- name: Install Yarn

.github/workflows/snyk-security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
# For Snyk Open Source you must first set up the development environment for your application's dependencies
4747
# For example for Node
48-
- uses: actions/setup-node@v3
48+
- uses: actions/setup-node@v4
4949
with:
5050
node-version-file: .tool-versions
5151

.github/workflows/test-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v3
17+
- uses: actions/setup-node@v4
1818
with:
1919
node-version-file: .tool-versions
2020
- name: Node Version
@@ -38,7 +38,7 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v4
41-
- uses: actions/setup-node@v3
41+
- uses: actions/setup-node@v4
4242
with:
4343
node-version-file: .tool-versions
4444
- name: Node Version
@@ -90,7 +90,7 @@ jobs:
9090
steps:
9191
- name: Checkout
9292
uses: actions/checkout@v4
93-
- uses: actions/setup-node@v3
93+
- uses: actions/setup-node@v4
9494
with:
9595
node-version-file: .tool-versions
9696
- name: Node Version

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "pd-live-react",
33
"homepage": "https://pagerduty.github.io/pd-live-react",
4-
"version": "0.10.2-beta.0",
4+
"version": "0.11.0-beta.0",
55
"private": true,
66
"dependencies": {
7-
"@chakra-ui/icons": "^2.1.0",
7+
"@chakra-ui/icons": "^2.1.1",
88
"@chakra-ui/react": "^2.8.0",
99
"@datadog/browser-rum": "^4.47.0",
1010
"@emotion/react": "^11.11.1",
@@ -15,19 +15,19 @@
1515
"@fortawesome/free-solid-svg-icons": "^6.4.2",
1616
"@fortawesome/react-fontawesome": "^0.2.0",
1717
"@pagerduty/pdjs": "^2.2.3",
18-
"@types/jest": "^29.5.3",
18+
"@types/jest": "^29.5.4",
1919
"@types/node": "^20.5.7",
20-
"@types/react": "^18.2.20",
20+
"@types/react": "^18.2.21",
2121
"@types/react-dom": "^18.2.7",
22-
"axios": "^1.5.0",
22+
"axios": "^1.6.0",
2323
"bootstrap": "^4.6.2",
2424
"bottleneck": "^2.19.5",
2525
"chakra-react-select": "^4.7.0",
2626
"date-fns": "^2.29.3",
2727
"font-awesome": "^4.7.0",
2828
"framer-motion": "^10.16.2",
2929
"fuse.js": "^6.6.2",
30-
"i18next": "^23.4.6",
30+
"i18next": "^23.7.6",
3131
"i18next-browser-languagedetector": "^7.1.0",
3232
"immer": "^10.0.2",
3333
"jsonpath-plus": "^7.2.0",
@@ -37,7 +37,7 @@
3737
"moment": "^2.29.4",
3838
"pretty-print-error": "^1.1.1",
3939
"react": "^18",
40-
"react-bootstrap": "^2.8.0",
40+
"react-bootstrap": "^2.9.1",
4141
"react-contextmenu": "^2.14.0",
4242
"react-datepicker": "^4.16.0",
4343
"react-dnd": "^16.0.1",
@@ -103,7 +103,7 @@
103103
"@cypress/react": "^8.0.0",
104104
"@faker-js/faker": "^8.0.2",
105105
"@testing-library/dom": "^9.3.0",
106-
"@testing-library/jest-dom": "^6.0.1",
106+
"@testing-library/jest-dom": "^6.1.4",
107107
"@testing-library/react": "^14.0.0",
108108
"@testing-library/react-hooks": "^8.0.1",
109109
"@testing-library/user-event": "^14.4.3",
@@ -130,11 +130,11 @@
130130
"eslint-plugin-styled-components-a11y": "^2.1.31",
131131
"genversion": "^3.1.1",
132132
"gh-pages": "^6.0.0",
133-
"i18next-parser": "^8.6.0",
133+
"i18next-parser": "^8.9.0",
134134
"identity-obj-proxy": "^3.0.0",
135135
"jest": "^29.6.3",
136136
"jest-canvas-mock": "^2.5.2",
137-
"jest-environment-jsdom": "^29.6.3",
137+
"jest-environment-jsdom": "^29.7.0",
138138
"jest-environment-node": "^29.6.3",
139139
"jest-location-mock": "^1.0.10",
140140
"jest-transformer-svg": "^2.0.1",

src/config/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/util/auth.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,31 @@ export const exchangeCodeForToken = async (
9292
codeVerifier,
9393
code,
9494
) => {
95-
// eslint-disable-next-line no-unused-vars
96-
const postData = async (url, _data) => {
95+
const postData = async (url, data) => {
96+
const formData = new URLSearchParams(data); // Convert data to URL-encoded form data
9797
const response = await fetch(url, {
9898
method: 'POST',
99+
headers: {
100+
'Content-Type': 'application/x-www-form-urlencoded', // Set the content type
101+
},
102+
body: formData.toString(), // Convert the form data to a string
99103
});
100-
const json = response.json();
104+
const json = await response.json(); // Parse the response JSON
101105
return json;
102106
};
103107

104-
const requestTokenUrl = 'https://identity.pagerduty.com/oauth/token?'
105-
+ 'grant_type=authorization_code&'
106-
+ `code=${code}&`
107-
+ `redirect_uri=${redirectURL}&`
108-
+ `client_id=${clientId}&`
109-
+ `client_secret=${clientSecret}&`
110-
+ `code_verifier=${codeVerifier}`;
111-
const data = await postData(requestTokenUrl, {});
108+
const requestTokenUrl = 'https://identity.pagerduty.com/oauth/token';
109+
const formData = {
110+
grant_type: 'authorization_code',
111+
code,
112+
redirect_uri: redirectURL,
113+
client_id: clientId,
114+
client_secret: clientSecret,
115+
code_verifier: codeVerifier,
116+
};
117+
118+
const data = await postData(requestTokenUrl, formData);
119+
112120
if (data.access_token) {
113121
return data.access_token;
114122
}

0 commit comments

Comments
 (0)