Skip to content

Commit

Permalink
do not set signInLink to empty when OAuthAppCredentials is set (#1907) (
Browse files Browse the repository at this point in the history
#1908)

Co-authored-by: Ted <tedlee@microsoft.com>
  • Loading branch information
carlosscastro and lzc850612 authored Mar 16, 2020
1 parent afe1d79 commit ea0506d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/botbuilder-dialogs/src/prompts/oauthPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,12 @@ export class OAuthPrompt extends Dialog {
const signInResource = await (context.adapter as ExtendedUserTokenProvider).getSignInResource(context, this.settings.connectionName, context.activity.from.id, null, this.settings.oAuthAppCredentials);
let link = signInResource.signInLink;
const identity = context.turnState.get((context.adapter as BotAdapter).BotIdentityKey);
if((identity && isSkillClaim(identity.claims)) || OAuthPrompt.isFromStreamingConnection(context.activity)) {

// use the SignInLink when
// in speech channel or
// bot is a skill or
// an extra OAuthAppCredentials is being passed in
if((identity && isSkillClaim(identity.claims)) || OAuthPrompt.isFromStreamingConnection(context.activity) || this.settings.oAuthAppCredentials) {
if(context.activity.channelId === Channels.Emulator) {
cardActionType = ActionTypes.OpenUrl;
}
Expand Down

0 comments on commit ea0506d

Please sign in to comment.