Skip to content

fs: simplify auth #211

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
merged 3 commits into from
Jul 21, 2022
Merged

fs: simplify auth #211

merged 3 commits into from
Jul 21, 2022

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jul 19, 2022

Compared to how we were using it in dvc before:

  1. doesn't require/accept tmp_dir at all, caches creds in
    appdirs("pydrive2fs", appauthor=False).
  2. caching is per client_id, so no risk of using mismatched client_id and
    cached creds. If user supplies a profile(defaults to default) - we'll
    also cache it by profile to support multiple google users using the same
    client_id.
  3. renamed service_account_json_file_path into client_json_file_path for
    consistency.
  4. renamed service_account_user_email into client_user_email for
    consistency.

Other than that, this is mostly old code.

Fixes #193

@efiop efiop temporarily deployed to internal July 19, 2022 18:46 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 18:47 Inactive
@efiop efiop changed the title fs: simplify auth [WIP] fs: simplify auth Jul 19, 2022
@efiop efiop temporarily deployed to internal July 19, 2022 18:48 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 18:54 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:23 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:25 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:29 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:32 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:40 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:46 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 19:56 Inactive
@efiop efiop temporarily deployed to internal July 19, 2022 20:02 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 21:46 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 21:47 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 21:48 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 22:06 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 22:12 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 22:15 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 22:19 Inactive
@efiop efiop temporarily deployed to internal July 20, 2022 22:22 Inactive
@efiop efiop changed the title [WIP] fs: simplify auth fs: simplify auth Jul 20, 2022
@efiop efiop requested a review from shcheklein July 20, 2022 22:28
@efiop
Copy link
Contributor Author

efiop commented Jul 20, 2022

@shcheklein Should be alright for now. Please take a look when you'll have time.

efiop added 3 commits July 21, 2022 01:31
Compared to how we were using it in dvc before:

1) doesn't require/accept `tmp_dir` at all, caches creds in
   `appdirs("pydrive2fs", appauthor=False)`.
2) caching is per `client_id`, so no risk of using mismatched client_id and
   cached creds. If user supplies a `profile`(defaults to `default`) - we'll
   also cache it by `profile` to support multiple google users using the same
   `client_id`.
3) renamed `service_account_json_file_path` into `client_json_file_path` for
   consistency.
4) renamed `service_account_user_email` into `client_user_email` for
   consistency.

Other than that, this is mostly old code.

Fixes #193
@efiop efiop temporarily deployed to internal July 20, 2022 22:31 Inactive
@efiop efiop merged commit 301d667 into master Jul 21, 2022
@efiop efiop deleted the auth branch July 21, 2022 00:30
efiop added a commit to efiop/dvc that referenced this pull request Feb 16, 2023
We used to use it in gdrive before iterative/PyDrive2#211
efiop added a commit to efiop/dvc that referenced this pull request Feb 16, 2023
We used to use it in gdrive before iterative/PyDrive2#211
efiop added a commit to iterative/dvc that referenced this pull request Feb 16, 2023
We used to use it in gdrive before iterative/PyDrive2#211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fs: simplify auth
2 participants