-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add service account login support to phase auth #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…d deprecation notice - Renamed the function `get_default_user_id` to `get_default_account_id` for clarity and to better reflect its purpose. - Updated the function's docstring to indicate it now handles both user accounts and service accounts. - Added a deprecated version of `get_default_user_id` that calls the new function for backward compatibility.
- Replaced the usage of `get_default_user_id` with `get_default_account_id` in the keyring service name generation for improved clarity and consistency with recent changes.
- Updated the whoami command to display 'N/A (Service Account)' if the default user's email is not available, improving clarity for service accounts. - Renamed 'User ID' to 'Account ID' for consistency with recent changes.
- Changed terminology from 'User ID' to 'Account ID' for clarity. - Updated email handling to display 'Service Account' when applicable. - Adjusted prompts and error messages to reflect the new account terminology.
…onality - Updated the logout functionality to use `get_default_account_id` instead of `get_default_user_id` for consistency with recent changes. - Adjusted keyring password deletion and configuration updates to reflect the new account terminology.
- Eliminated the import of `get_default_user_id` from `phase_cli.utils.misc` as it is no longer needed, streamlining the code for better clarity and consistency.
- Updated the authentication process to support both Personal Access Tokens (PATs) and Service Account Tokens, improving flexibility. - Introduced checks for the PHASE_HOST environment variable to allow headless operation. - Replaced user ID references with account ID for consistency across the authentication flow. - Enhanced error handling and user prompts to accommodate service accounts and ensure clarity in user interactions.
- Added support for Personal Access Tokens (PATs) by prompting for user email when a PAT is detected. - Improved handling of unknown token formats to ensure user email is requested for clarity and safety. - Streamlined the authentication process to accommodate both PATs and Service Account Tokens.
Deploying phase-cli-install-script with
|
| Latest commit: |
f97b535
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://71c28656.phase-cli-install-script.pages.dev |
| Branch Preview URL: | https://feat--phase-auth-svc-account.phase-cli-install-script.pages.dev |
Member
Author
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
rohan-chaturvedi
approved these changes
Sep 17, 2025
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.
This PR adds the ability to use Service Account Token with
phase auth.Changes:
phase authif PHASE_HOST is available, the user will not be prompted for selecting instance type. A message with log this.