Skip to content

Commit

Permalink
Remove validation for exchangeToken method (#4138)
Browse files Browse the repository at this point in the history
Co-authored-by: Monica Rivera <44449640+mrivera-ms@users.noreply.github.com>
  • Loading branch information
ceciliaavila and mrivera-ms authored Mar 11, 2022
1 parent f498114 commit 2e31329
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions libraries/botbuilder-dialogs/src/prompts/oauthPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,6 @@ export class OAuthPrompt extends Dialog {
'expected by the bots active OAuthPrompt. Ensure these names match when sending the InvokeActivityInvalid ConnectionName in the TokenExchangeInvokeRequest'
)
);
} else if (!('exchangeToken' in context.adapter)) {
// Token Exchange not supported in the adapter
await context.sendActivity(
this.getTokenExchangeInvokeResponse(
StatusCodes.BAD_GATEWAY,
"The bot's BotAdapter does not support token exchange operations. Ensure the bot's Adapter supports the ExtendedUserTokenProvider interface."
)
);

throw new Error('OAuthPrompt.recognizeToken(): not supported by the current adapter');
} else {
let tokenExchangeResponse: TokenResponse;
try {
Expand Down

0 comments on commit 2e31329

Please sign in to comment.