Skip to content

Commit

Permalink
Expose raw_attributes on Profile (#204)
Browse files Browse the repository at this point in the history
* On the API, we recently exposed raw_attributes, the original profile
  response we receive from the IdP. This update passes this data through
  the SDK.
* Updates the SDK to 0.5.0
  • Loading branch information
willmanduffy authored Aug 25, 2020
1 parent ae5b6dd commit 2d4e558
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.1",
"version": "0.5.0",
"name": "@workos-inc/node",
"author": "WorkOS",
"description": "A Node wrapper for the WorkOS API",
Expand Down
7 changes: 6 additions & 1 deletion src/sso/__snapshots__/sso.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Object {
"Accept": "application/json, text/plain, */*",
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
"User-Agent": "workos-node/0.4.1",
"User-Agent": "workos-node/0.5.0",
}
`;

Expand All @@ -29,5 +29,10 @@ Object {
"id": "prof_123",
"idp_id": "123",
"last_name": "bar",
"raw_attributes": Object {
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
},
}
`;
1 change: 1 addition & 0 deletions src/sso/interfaces/profile.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export interface Profile {
email: string;
first_name?: string;
last_name?: string;
raw_attributes?: { [key: string]: any };
}
5 changes: 5 additions & 0 deletions src/sso/sso.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ describe('SSO', () => {
email: '[email protected]',
first_name: 'foo',
last_name: 'bar',
raw_attributes: {
email: '[email protected]',
first_name: 'foo',
last_name: 'bar',
},
},
});

Expand Down

0 comments on commit 2d4e558

Please sign in to comment.