Open jelleholtkamp opened 2 months ago
I've been pulling my hair out at this as well for the past week! I couldn't get SSO examples working in Python, so moved into this MSGraph Auth, and while it logs in it won't log out.
I got to the point of determining its because the main app.py has switch from using the BotFrameworkAdapter
to the CloudAdapter
but don't think the logout.py has been updated to handle this update (as CloudAdapter
has no definition for sign_out_user()
).
I'm debating today on trying to roll back the packages instead of using the latest 4.14.8
, as one of the older releases may resolve this but I'm not hopeful.
Correction notes:
As a start, the samples LogoutDialog._interrupt should match the DotNet LogoutDialog.InterruptAsync.
UserTokenClient can be retrieved via:
user_token_client: UserTokenClient = inner_dc.context.turn_state.get(
UserTokenClient.__name__, None
)
This needs to be reviewed in Python SDK though, as it pertains to UserTokenClient being set in TurnState.
I am facing the same issue:
await bot_adapter.sign_out_user(inner_dc.context, self.connection_name)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CloudAdapter' object has no attribute 'sign_out_user'
Sample information
Describe the bug
I run into an error when trying to logout. Sign-in is succesful as the bot does return my token. I am following this
To Reproduce
Steps to reproduce the behavior: I followed the BotBuilder sample readme for this authentication which refers to the Add authentication to a bot guide. I'm pretty sure I followed all the steps, since authentication does work and I the bot returns my token when asked. It's just that the logout command is not working.
Expected behavior
The session gets logged out