Migrate getDelegationToken() to auth0.js v9

Hi,
My app is currently using Auth0 v7 and its getDelegationToken() method to connect to AWS for uploading files to an S3 bucket.

The docs appear to have a lot of documentation around the ‘/delegation’ endpoint which is also getting deprecated but I’m having trouble finding what to do to successfully migrate my delegation functions to the new v9 library. Can anyone point me in the right direction?

Thanks!

-Mikey

You can use the delegation method as a replacement for getDelegationToken. Here’s an example:

webAuth.client.delegation({
  client_id: '',
  grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
  id_token: 'valid idToken here',
  target: 'target client id here',
  scope: 'openid'
});

You can find more details on this in the migration guide.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.