Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 3a22db5

Browse files
authored
set signInLink to empty when OAuthAppCredentials is set (#862)
1 parent 73580a9 commit 3a22db5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/oauth_prompt.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,18 @@ async def _send_oauth_card(
311311
link = sign_in_resource.sign_in_link
312312
bot_identity: ClaimsIdentity = context.turn_state.get("BotIdentity")
313313

314+
# use the SignInLink when
315+
# in speech channel or
316+
# bot is a skill or
317+
# an extra OAuthAppCredentials is being passed in
314318
if (
315-
bot_identity and SkillValidation.is_skill_claim(bot_identity.claims)
316-
) or not context.activity.service_url.startswith("http"):
319+
(
320+
bot_identity
321+
and SkillValidation.is_skill_claim(bot_identity.claims)
322+
)
323+
or not context.activity.service_url.startswith("http")
324+
or self._settings.oath_app_credentials
325+
):
317326
if context.activity.channel_id == Channels.emulator:
318327
card_action_type = ActionTypes.open_url
319328
else:

0 commit comments

Comments
 (0)