@@ -362,7 +362,9 @@ async def _send_oauth_card(
362
362
):
363
363
if context .activity .channel_id == Channels .emulator :
364
364
card_action_type = ActionTypes .open_url
365
- else :
365
+ elif not OAuthPrompt ._channel_requires_sign_in_link (
366
+ context .activity .channel_id
367
+ ):
366
368
link = None
367
369
368
370
json_token_ex_resource = (
@@ -546,7 +548,7 @@ async def _recognize_token(
546
548
if not token_exchange_response or not token_exchange_response .token :
547
549
await context .send_activity (
548
550
self ._get_token_exchange_invoke_response (
549
- int (HTTPStatus .CONFLICT ),
551
+ int (HTTPStatus .PRECONDITION_FAILED ),
550
552
"The bot is unable to exchange token. Proceed with regular login." ,
551
553
)
552
554
)
@@ -609,7 +611,6 @@ def _is_teams_verification_invoke(context: TurnContext) -> bool:
609
611
@staticmethod
610
612
def _channel_suppports_oauth_card (channel_id : str ) -> bool :
611
613
if channel_id in [
612
- Channels .ms_teams ,
613
614
Channels .cortana ,
614
615
Channels .skype ,
615
616
Channels .skype_for_business ,
@@ -618,6 +619,13 @@ def _channel_suppports_oauth_card(channel_id: str) -> bool:
618
619
619
620
return True
620
621
622
+ @staticmethod
623
+ def _channel_requires_sign_in_link (channel_id : str ) -> bool :
624
+ if channel_id in [Channels .ms_teams ]:
625
+ return True
626
+
627
+ return False
628
+
621
629
@staticmethod
622
630
def _is_token_exchange_request_invoke (context : TurnContext ) -> bool :
623
631
activity = context .activity
0 commit comments