How to Set RS256 as the Signature Algorithm while Creating an Application with the Node.js SDK

Problem statement

While creating an application with Auth0’s NodeJs SDK, how can the RS256 algorithm be set as the signature algorithm?

Solution

While creating an application, the ClientJwtConfiguration object with the alg attribute has to be passed while creating the client. Here is a sample code showing how to use the attribute:

import { ManagementClient } from 'auth0';

const management = new ManagementClient({
  domain: '{YOUR_TENANT_AND REGION}.auth0.com',
  clientId: '{YOUR_CLIENT_ID}',
  clientSecret: '{YOUR_CLIENT_SECRET}',
});

const data = {
      name: 'test_name',
      jwt_configuration : {
         'alg' : 'RS256'
      },
      ..... // rest of the paramaters as needed
    };
await management.clients.create(data);