Ensure Widgets have the appropriate permissions in your application.
Widgets must be supplied with an authorization token. The token can be acquired in one of two ways:
authkit-js or authkit-react libraries, you can use the provided access token.
const authToken = await workos.widgets.getToken({ userId: user.id, organizationId, // scopes corresponds to the permissions required for each widget (see below) scopes: ['widgets:users-table:manage', 'widgets:sso:manage'], });
To successfully generate a token, the user must be assigned a role with the correct permissions for the widget.