Skip to content

Commit e47c960

Browse files
authored
Merge pull request #149 from kinde-oss/fix/portalurl
fix: portal url generaton
2 parents 59aa987 + 334a9f8 commit e47c960

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/utils/generatePortalUrl.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe("generatePortalUrl", () => {
9191
});
9292

9393
expect(fetchSpy).toBeCalledWith(
94-
`https://mykindedomain.com/account_api/v1/portal_link?sub_nav=organization_members&return_url=http%3A%2F%2Fsomereturnurl.com`,
94+
`https://mykindedomain.com/account_api/v1/portal_link?subnav=organization_members&return_url=http%3A%2F%2Fsomereturnurl.com`,
9595
{
9696
headers: {
9797
Authorization: "Bearer storedAccessToken",
@@ -122,7 +122,7 @@ describe("generatePortalUrl", () => {
122122
});
123123

124124
expect(fetchSpy).toBeCalledWith(
125-
`https://mykindedomain.com/account_api/v1/portal_link?sub_nav=profile&return_url=http%3A%2F%2Fsomereturnurl.com`,
125+
`https://mykindedomain.com/account_api/v1/portal_link?subnav=profile&return_url=http%3A%2F%2Fsomereturnurl.com`,
126126
{
127127
headers: {
128128
Authorization: "Bearer storedAccessToken",
@@ -156,7 +156,7 @@ describe("generatePortalUrl", () => {
156156
});
157157

158158
expect(fetchSpy).toBeCalledWith(
159-
`https://mykindedomain.kinde.com/account_api/v1/portal_link?sub_nav=organization_payment_details&return_url=http%3A%2F%2Fanotherredirect.com`,
159+
`https://mykindedomain.kinde.com/account_api/v1/portal_link?subnav=organization_payment_details&return_url=http%3A%2F%2Fanotherredirect.com`,
160160
{
161161
headers: {
162162
Authorization: "Bearer storedAccessToken",
@@ -196,7 +196,7 @@ describe("generatePortalUrl", () => {
196196
expect.any(Object),
197197
);
198198
expect(fetchSpy).toBeCalledWith(
199-
expect.stringContaining(`sub_nav=${subNav}`),
199+
expect.stringContaining(`subnav=${subNav}`),
200200
expect.any(Object),
201201
);
202202
});
@@ -317,7 +317,7 @@ describe("generatePortalUrl", () => {
317317
});
318318
expect(fetchSpy).toBeCalled();
319319
expect(fetchSpy).toBeCalledWith(
320-
expect.stringContaining(`sub_nav=${subNav}`),
320+
expect.stringContaining(`subnav=${subNav}`),
321321
expect.any(Object),
322322
);
323323
});
@@ -346,7 +346,7 @@ describe("generatePortalUrl", () => {
346346
});
347347

348348
expect(fetchSpy).toBeCalledWith(
349-
expect.stringContaining(`sub_nav=${subNav}`),
349+
expect.stringContaining(`subnav=${subNav}`),
350350
expect.any(Object),
351351
);
352352
});

lib/utils/generatePortalUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const generatePortalUrl = async ({
8080
}
8181

8282
const params = new URLSearchParams({
83-
sub_nav: subNav || PortalPage.profile,
83+
subnav: subNav || PortalPage.profile,
8484
return_url: returnUrl,
8585
});
8686

0 commit comments

Comments
 (0)