Repository: microsoft/botbuilder-python

Issue:
In bot builder dialog after successful login, login_step function is not getting called.
### Github issues for [Python](https://github.com/microsoft/BotBuilder-Samples/issues) /[Microsoft Bot Builder]](https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/python/46.teams-auth)/ [Python]

## Sample information
1. Sample type: [Microsoft Bot Builder]
2. Sample language: [Python]
3. Sample name: <46.teams-auth>

We are facing an issue after successful login to the team's bot. The issue is like in teams auth bot it's asking for the login through the sign-in button and on click of it, it opens the pop-up and gets the users details and gets successful login but gives the error "botbuilder/dialogs/prompts/oauth_prompt.py __init__() takes 1 positional argument but 2 were given"

This login was working fine a few days back. But even if we are trying to run the official solution given on-site it's not calling to login_step function. and directly sending the error from python packages.

## To Reproduce
Steps to reproduce the behavior:
1. download https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/python/46.teams-auth this sample
2. change the config.py file and put the APP_ID, APP_PASSWORD and CONNECTION_NAME
3. create virtual env of any python version either 3.6, or 3.7 or 3.8
4. Install the requirenment.txt file
5. run the code "python app.py"
6. start the MS bot emulator of version 4.12 or 4.8 also tried 4.4
7. connect to ng rock in settings
8. click on the open bot and enter http://localhost:3978/api/messages
9. send some messages to get the sign-in button
10. Click on sign in and then after successful sign in it does not go to login_step in the local emulator and when we deploy to teams bot service it gives the above error.

## Expected behavior
After login, it should go to login_step in the main_dialog.py file and execute further code.
## Screenshots
![image](https://user-images.githubusercontent.com/6695075/131828762-c5c8cb07-a867-49e8-aa81-68c3f25c7ebd.png)


## Additional context
we have tried the different versions of python also different version of bot builder packages but still not working.



Discussion:
@maheshpardeshi This is a sample for MS Teams, but you are using it in the Emulator. Does it work in Teams?
> @maheshpardeshi This is a sample for MS Teams, but you are using it in the Emulator. Does it work in Teams?

Hi Dana, I deployed it to azure bot registration service and check in Teams app, but it did not work there also.
I am getting below error in app service for teams app. and error is coming from oauth_prompt.py in that environment where we do not have any control. We have tried the different versions of bot builder. Python 3.8 is running in that service. 

```
2021-09-04T15:25:23.166832069Z: [ERROR]
2021-09-04T15:25:23.166836069Z: [ERROR]   [on_turn_error] unhandled error: __init__() takes 1 positional argument but 2 were given
2021-09-04T15:25:23.166839569Z: [ERROR]  Traceback (most recent call last):
2021-09-04T15:25:23.166842869Z: [ERROR]    File "/tmp/8d96f0e1d99a2bf/antenv/lib/python3.8/site-packages/botbuilder/dialogs/prompts/oauth_prompt.py", line 432, in _recognize_token
2021-09-04T15:25:23.166846469Z: [ERROR]      value=InvokeResponse(int(HTTPStatus.OK)),
2021-09-04T15:25:23.166849769Z: [ERROR]  TypeError: __init__() takes 1 positional argument but 2 were given
2021-09-04T15:25:23.166853169Z: [ERROR]
2021-09-04T15:25:23.166856269Z: [ERROR]  During handling of the above exception, another exception occurred:
2021-09-04T15:25:23.166859669Z: [ERROR]
2021-09-04T15:25:23.166862770Z: [ERROR]  Traceback (most recent call last):
2021-09-04T15:25:23.166866170Z: [ERROR]    File "/tmp/8d96f0e1d99a2bf/antenv/lib/python3.8/site-packages/botbuilder/core/bot_adapter.py", line 128, in run_pipeline
2021-09-04T15:25:23.166869770Z: [ERROR]      return await self._middleware.receive_activity_with_status(
2021-09-04T15:25:23.166873270Z: [ERROR]    File "/tmp/8d96f0e1d99a2bf/antenv/lib/python3.8/site-packages/botbuilder/core/middleware_set.py", line 69, in receive_activity_with_status
2021-09-04T15:25:23.166876970Z: [ERROR]      return await self.receive_activity_internal(context, callback)
2021-09-04T15:25:23.166880270Z: [ERROR]    File "/tmp/8d96f0e1d99a2bf/antenv/lib/python3.8/site-packages/botbuilder/core/middleware_set.py", line 79, in receive_activity_internal
2021-09-04T15:25:23.166883970Z: [ERROR]      return await callback(context)
```
@maheshpardeshi I am able to reproduce and am investigating the root cause. Thank you for your patience.
Hi Dana,

Thanks for looking into the issue. I feel this issue specifically comes in the team's app only. in web emulator, it works but does not work in teams app. It will be a great help if you can show the direction from here.

Hi Dana, Any update on this?
@clearab, @tracyboehrer - We are also able to repro the issue raised by developer. Could you please look into it?

Resolving patch:
diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/oauth_prompt.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/oauth_prompt.py
--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/oauth_prompt.py
+++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/oauth_prompt.py
@@ -429,21 +429,21 @@ async def _recognize_token(
                     await context.send_activity(
                         Activity(
                             type="invokeResponse",
-                            value=InvokeResponse(int(HTTPStatus.OK)),
+                            value=InvokeResponse(status=HTTPStatus.OK),
                         )
                     )
                 else:
                     await context.send_activity(
                         Activity(
                             type="invokeResponse",
-                            value=InvokeResponse(int(HTTPStatus.NOT_FOUND)),
+                            value=InvokeResponse(status=HTTPStatus.NOT_FOUND),
                         )
                     )
             except Exception:
                 await context.send_activity(
                     Activity(
                         type="invokeResponse",
-                        value=InvokeResponse(int(HTTPStatus.INTERNAL_SERVER_ERROR)),
+                        value=InvokeResponse(status=HTTPStatus.INTERNAL_SERVER_ERROR),
                     )
                 )
         elif self._is_token_exchange_request_invoke(context):


Test patch: