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

Document how to acquire OneDrive's access_token or at least refer to useful information #1320

Open
simonsan opened this issue Jun 12, 2024 · 2 comments
Labels
A-config Area: Related to the config file functionality and format A-docs Area: Improvements or additions to documentation C-enhancement Category: New feature or request

Comments

@simonsan
Copy link
Contributor

simonsan commented Jun 12, 2024

Relevant information from openDAL side:

Cross-posting relevant replies from imWildCat #2129 (comment)

To get a working access_token for OneDrive, we can leverage https://crates.io/crates/graph-rs-sdk, especially its demo: https://github.com/sreeise/graph-rs-sdk/tree/master/examples/oauth

From #2129 (comment)

If you'd like to check some tutorials, I did find a quick for you: https://www.youtube.com/watch?v=NljQx11YqNY
In general, OAuth flows for these big techs are pretty complex, sometimes replying on their own SDKs by default. I was working in MSFT. So I knew this very well. For example, if you'd like to use Graph API on iOS/macOS, you might want https://github.com/AzureAD/azure-activedirectory-library-for-objc Why this flow is always complicated? Because they must respect users' privacy and also data compliance, like GDPR. So it is always required something like "User Consent".
The goal of OpenDAL is just a light-weight wrapper of some data uploading / downloading apis. So this lib is not depending on any of these first-party SDKs provided by the service companies.
In my own company, I write these logic into Rust directly, referring to the sample code link I shared above. You'd better check them out before being surprised here. This flow would be easier for you if you write them in Rust for all the other big ones, like Google and/or Dropbox.

Ref: #1161 apache/opendal#4715

@intgr
Copy link
Contributor

intgr commented Jun 13, 2024

FWIW the current Rustic release 0.7.0 has OpenDAL OneDrive support disabled too, so documentation is misleading. I had to manually edit Cargo.toml and rebuild to enable it.

Ref: #1161 (comment)

@simonsan simonsan transferred this issue from rustic-rs/docs Oct 11, 2024
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Oct 11, 2024
@simonsan simonsan added A-docs Area: Improvements or additions to documentation C-enhancement Category: New feature or request A-config Area: Related to the config file functionality and format and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Oct 11, 2024
@simonsan
Copy link
Contributor Author

@intgr Would you be able to provide some information about the onedrive config you are using and pull request it against this directory: https://github.com/rustic-rs/rustic/tree/main/config/services

Would be a nice addition :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config Area: Related to the config file functionality and format A-docs Area: Improvements or additions to documentation C-enhancement Category: New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants