From 06058fc847288a5dadd3c6215a40db7f2cd9578a Mon Sep 17 00:00:00 2001 From: Claudiu Badau Date: Mon, 7 Nov 2016 13:01:20 -0500 Subject: [PATCH] Update getDelegationToken Tried passing in the `targetClientID` and `id_token` but got an error. Based on [Auth0.js delegation token documentation] (https://github.com/auth0/auth0.js#delegation-token-request) you should just be passing in the options and callback. This worked for me. ```js auth0.getDelegationToken(options, function (err, delegationResult) { // Call your API using delegationResult.id_token }); ``` --- auth0-js/auth0-js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth0-js/auth0-js.d.ts b/auth0-js/auth0-js.d.ts index 250c7a850e..32d9575845 100644 --- a/auth0-js/auth0-js.d.ts +++ b/auth0-js/auth0-js.d.ts @@ -22,7 +22,7 @@ interface Auth0Static { logout(query: string): void; getConnections(callback?: Function): void; refreshToken(refreshToken: string, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void; - getDelegationToken(targetClientId: string, id_token: string, options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void; + getDelegationToken(options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void; getProfile(id_token: string, callback?: Function): Auth0UserProfile; getSSOData(withActiveDirectories: any, callback?: Function): void; parseHash(hash: string): Auth0DecodedHash;