Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Conversation

@graceliching
Copy link
Contributor

Hi Dima, testing out the ability to add member of the team into the JWT for this issue: https://github.com/workato/issues/issues/19744. Can you help to verify if something like this will work? Thanks.

server/index.js Outdated
jti: nanoid(),
origin: WK_CUSTOM_VENDOR_ORIGIN || undefined
},
process.env.WK_JWT_PRIVATE_KEY,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can extract this value with another env variables:

Suggested change
process.env.WK_JWT_PRIVATE_KEY,
WK_JWT_PRIVATE_KEY,

server/index.js Outdated
process.env.WK_JWT_PRIVATE_KEY,
{algorithm: 'RS256'}
);
const {WK_API_KEY, WK_CUSTOMER_ID, WK_USER_ID, WK_CUSTOM_VENDOR_ORIGIN} = process.env;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const {WK_API_KEY, WK_CUSTOMER_ID, WK_USER_ID, WK_CUSTOM_VENDOR_ORIGIN} = process.env;
const {WK_API_KEY, WK_CUSTOMER_ID, WK_USER_ID, WK_CUSTOM_VENDOR_ORIGIN, WK_JWT_PRIVATE_KEY} = process.env;

server/index.js Outdated
{
sub: subParams.join(':'),
jti: nanoid(),
origin: WK_CUSTOM_VENDOR_ORIGIN || undefined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If WK_CUSTOM_VENDOR_ORIGIN is not defined it will be undefined.

Suggested change
origin: WK_CUSTOM_VENDOR_ORIGIN || undefined
origin: WK_CUSTOM_VENDOR_ORIGIN

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants