Merged
Conversation
f40e88d to
5e76590
Compare
5e76590 to
e19cad8
Compare
e19cad8 to
bed2b16
Compare
The UiPath runtime caches credentials at init time via UiPathApiConfig. When the server starts unauthenticated and the user logs in later, os.environ gets updated but the existing factory still holds stale (empty) credentials, causing 401s on subsequent API calls. - Add _on_authenticated callback to AuthState, wired in create_app to trigger server.reload_factory() after successful login - Use _update_env_file (mirrors uipath._utils._auth.update_env_file) to write .env the same way as `uipath auth` - Use load_dotenv(dotenv_path=cwd/.env, override=True) matching the CLI root behavior - Bump version to 0.0.69 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bed2b16 to
7a76bba
Compare
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.
Summary
UiPathApiConfig). When the server starts unauthenticated and the user logs in,os.environgets updated but the factory still holds stale credentials → 401s on evals/runs_finalize_tenantnow triggersserver.reload_factory()via an_on_authenticatedcallback, so the runtime is recreated with fresh credentials.envusing the same approach asuipath authCLI (update_env_filepattern)load_dotenvnow uses explicitdotenv_path=cwd/.env+override=True, matching the CLI rootTest plan
.envcontainsUIPATH_ACCESS_TOKEN,UIPATH_URL,UIPATH_TENANT_ID,UIPATH_ORGANIZATION_ID🤖 Generated with Claude Code