Conversation
…into users/axsuarez/app-authorization
libraries/Core/microsoft-agents-core/microsoft/agents/core/_load_configuration.py
Outdated
Show resolved
Hide resolved
tracyboehrer
left a comment
There was a problem hiding this comment.
What are the use cases for on_sign_in_success? Is not the continuation activity an indicator of success? Does this mean they have two paths to execute a turn in? One for on_success, and one in the continuation handler?
@tracyboehrer Yes... kinda. on_sign_in_success will only be triggered when finishing the oauth flow successfully for the first time (not when already have the token). But yes, in that instance it will run on_sign_in_success and then the continuation activity. This use case is fairly limited to "successfully signed in" messages and such |
So that would be explained to the dev as "lets you tell the user they are signed in"? But we can't really limit it to that. They can do anything they want. Maybe that's ok. Maybe the dev wants to store something in state when this happens? "User signed in on {date/time}", then when SignOut is called store that? It's super easy to explain "on sign in failure". "Gives dev the opportunity to take other action... Handoff to a live person, tell them to call support, etc....). Honest question though and not a criticism. If I can imagine one case, there are certainly others. Looking for symmetry across languages. |
This pull request introduces significant updates to the
AgentApplicationclass and related components to enhance authorization and OAuth flow management. The changes include the addition of a newAuthorizationclass, updates to theApplicationOptionsclass for OAuth configuration, and the removal of deprecated or unused methods. Below is a breakdown of the most important changes:Authorization and OAuth Enhancements
Authorizationclass to manage OAuth flows, including token retrieval, flow state management, and sign-out functionality. This class also supports setting a handler for successful sign-ins. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/oauth/authorization.py)ApplicationOptionsto include an optionalauthorizationfield for configuring OAuth handlers. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/app_options.py)_authfield inAgentApplicationwith an instance of the newAuthorizationclass and integrated it into the initialization process. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/agent_application.py) [1] [2]Codebase Simplification and Cleanup
_run_ai_chainmethod and associated logic, as it is no longer in use. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/agent_application.py)re.matchwithre.fullmatchin text matching logic to improve accuracy. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/agent_application.py)API Improvements
on_sign_in_successmethod toAgentApplicationfor registering event listeners triggered upon successful user sign-ins. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/agent_application.py)Adjustments to Core Components
leewayfor JWT token validation from 5 seconds to 300 seconds to account for potential clock skew. (libraries/Core/microsoft-agents-authorization/microsoft/agents/authorization/jwt_token_validator.py)token_exchange_resourcefield in theOAuthCardclass optional. (libraries/Core/microsoft-agents-core/microsoft/agents/core/models/oauth_card.py)Miscellaneous
__init__.pyfiles to include new imports forAuthorizationand other related components. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/app/oauth/__init__.py,test_samples/app_style/shared/__init__.py) [1] [2]