diff --git a/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/oauth/oauth_flow.py b/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/oauth/oauth_flow.py index bab9d143..3a12b890 100644 --- a/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/oauth/oauth_flow.py +++ b/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/oauth/oauth_flow.py @@ -140,6 +140,7 @@ async def get_user_token(self, magic_code: str = None) -> TokenResponse: self._flow_state.expiration = ( datetime.now().timestamp() + self._default_flow_duration ) + self._flow_state.tag = FlowStateTag.COMPLETE return token_response diff --git a/libraries/microsoft-agents-hosting-core/tests/test_oauth_flow.py b/libraries/microsoft-agents-hosting-core/tests/test_oauth_flow.py index 9a358b00..9a3b3dd1 100644 --- a/libraries/microsoft-agents-hosting-core/tests/test_oauth_flow.py +++ b/libraries/microsoft-agents-hosting-core/tests/test_oauth_flow.py @@ -137,6 +137,7 @@ async def test_get_user_token_success(self, sample_flow_state, user_token_client flow = OAuthFlow(sample_flow_state, user_token_client) expected_final_flow_state = sample_flow_state expected_final_flow_state.user_token = RES_TOKEN + expected_final_flow_state.tag = FlowStateTag.COMPLETE # test token_response = await flow.get_user_token() @@ -201,6 +202,7 @@ async def test_begin_flow_easy_case( activity = mocker.Mock(spec=Activity) expected_flow_state = sample_flow_state expected_flow_state.user_token = RES_TOKEN + expected_flow_state.tag = FlowStateTag.COMPLETE # test response = await flow.begin_flow(activity)