[18.0][FIX] webservice: reset oauth2_flow regardless of server_environment - #161
Merged
Merged
Conversation
Contributor
Author
|
FTR build red for unrelated reason #162 |
Contributor
Author
You can already include the commit in your pending PRs. |
Contributor
ok, I'll include it |
PR#146 split server_environment out of `webservice` into the optional `webservice_server_env` module, but the logic resetting `oauth2_flow` when `auth_type` is no longer "oauth2" only lived in `webservice_server_env`'s `_compute_server_env` override. Without `server_environment` installed, switching a backend's `auth_type` away from "oauth2" (via the UI or a plain write) silently left a stale `oauth2_flow`, which `_get_adapter_protocol` would then still factor into the selected component. Add an `_onchange_auth_type` plus `create`/`write` overrides on `webservice.backend` itself so the reset is guaranteed unconditionally, independent of `server_environment`. `webservice_server_env`'s own override is unchanged and still covers its own case (env-var-driven values).
simahawk
force-pushed
the
18.0-fix-oauth2-flow-reset
branch
from
September 1, 2026 08:01
94740fb to
d8d9de5
Compare
Contributor
Author
|
/ocabot merge patch |
Contributor
|
What a great day to merge this nice PR. Let's do it! |
Contributor
|
Congratulations, your PR was merged at f416d15. Thanks a lot for contributing to OCA. ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#146 split server_environment out of
webserviceinto the optionalwebservice_server_envmodule, but the logic resettingoauth2_flowwhenauth_typeis no longer "oauth2" only lived inwebservice_server_env's_compute_server_envoverride.Without
server_environmentinstalled, switching a backend'sauth_typeaway from "oauth2" (via the UI or a plain write) silently left a staleoauth2_flow, which_get_adapter_protocolwould then still factor into the selected component.Add an
_onchange_auth_typepluscreate/writeoverrides onwebservice.backenditself so the reset is guaranteed unconditionally, independent ofserver_environment.webservice_server_env's own override is unchanged and still covers its own case (env-var-driven values).CC @yankinmax @gurneyalex