Skip to content
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

Use domain while getting totp instead of url #901

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skyvern/forge/sdk/services/bitwarden.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async def _get_secret_value_from_url(

# TODO (kerem): To make this more robust, we need to store the item id of the totp login item
# and use it here to get the TOTP code for that specific item
totp_command = ["bw", "get", "totp", url, "--session", session_key]
totp_command = ["bw", "get", "totp", domain, "--session", session_key]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using tldextract.extract(url).registered_domain instead of tldextract.extract(url).domain to ensure the domain includes the suffix (e.g., 'example.co.uk' instead of just 'example'). This will help avoid potential conflicts with similar domain names.

if bw_organization_id:
# We need to add this filter because the TOTP command fails if there are multiple results
# For now, we require that the bitwarden organization id has only one totp login item for the domain
Expand Down
Loading