Skip to content

Commit 6ade62e

Browse files
authored
Resolve an issue where we were not properly sending returnUrl to the API (#299)
* We need to translate `returnUrl` (the natural casing in our Node SDK) to `return_url` which our API will accept.
1 parent 930e29a commit 6ade62e

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.8.3",
2+
"version": "0.8.4",
33
"name": "@workos-inc/node",
44
"author": "WorkOS",
55
"description": "A Node wrapper for the WorkOS API",

src/portal/portal.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('Portal', () => {
6060
const subject = await workos.portal.generateLink({
6161
intent: GeneratePortalLinkIntent.SSO,
6262
organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
63+
returnUrl: 'https://www.example.com',
6364
});
6465

6566
expect(subject.link).toEqual(

src/portal/portal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class Portal {
3535
const { data } = await this.workos.post('/portal/generate_link', {
3636
intent,
3737
organization,
38-
returnUrl,
38+
return_url: returnUrl,
3939
});
4040

4141
return data;

src/sso/__snapshots__/sso.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Object {
1717
"Accept": "application/json, text/plain, */*",
1818
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
1919
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
20-
"User-Agent": "workos-node/0.8.3",
20+
"User-Agent": "workos-node/0.8.4",
2121
}
2222
`;
2323

0 commit comments

Comments
 (0)