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

Disable ring feature from yup-oauth2 #533

Open
adrian-budau opened this issue Dec 10, 2024 · 3 comments
Open

Disable ring feature from yup-oauth2 #533

adrian-budau opened this issue Dec 10, 2024 · 3 comments

Comments

@adrian-budau
Copy link

It was reenabled (because it's in the default list) in yup-oauth2 11.0. I'd do the patches myself but I'd rather know which way would you prefer:

  1. Just disable default features and enable all but crypto provider
  2. Add two new features in google-drive3 (ring and aws-lc) that futher enable the corresponding providers in yup-oauth2.

Without this fix consumers of google-drive3 suddenly need to call CryptoProvider install_default where before they didn't (because rustls by defaults use aws_lc and with ring there would no longer be clear which is the default)

@Byron
Copy link
Owner

Byron commented Dec 10, 2024

Thanks a lot for bringing this up!

Will google-apis crates still work out of the box if the default features of yup-oauth2 are disabled? If so, then let's disable default features and enable only what is truly in the way of no one.

If that's not the case, I guess there is no other way than to forward these two features from each google-crate, so people can disable default features on the google crate.

Please feel free to submit a PR with anything that works.
Thank you

@adrian-budau
Copy link
Author

From what I can guess they won't work, I'll actually try to test to be sure.

If it doesn't work I'll make the change with two features

@rcastill
Copy link

I confirmed that you cannot use yup_oauth2 as a standalone crate with aws-lc-rs feature as auth must implement GetToken and for that, the yup_oath2 feature must be enabled in the google crate.

So, this is how Cargo.toml should look:

[features]
google-gmail1 = "6.0.0"
hyper = "1.5.2"
# had to change aws-lc-rs -> ring because google-gmail/yup_oauth2 enables ring
hyper-rustls = { version = "0.27.5", default-features = false, features = ["http1", "logging", "native-tokio", "tls12", "ring"] }
hyper-util = "0.1.10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants