-
Notifications
You must be signed in to change notification settings - Fork 22
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
Documentation failing to build on docs.rs #54
Comments
Hey, I think docs.rs is failing because of this crate has a lot of crate features defined (docs.rs pipeline throws out of memory errors). I'll try to investigate if it is possible to do something about it. There is a section about Google authentication that may answer your question: Also you can ask here what you want to achieve. |
Hey @abdolence, appreciate the quick response, I saw the Google authentication part in the README, though I was looking if we could manually specify the path of the service account, instead of using environment variables. It is worth mentioning that I am using |
The way this is currently implemented is somehow similar how Google itself implements this in their client libraries. The important part is that on production you usually rely on the GKE/GCE/Cloud Run etc environments that configure service accounts for you themselves, and you should use it from the "environment". Creating and managing JSON files manually is considered less secure approach nowadays. Theoretically speaking It is possible to implement even more options to specify it explicitly, but I don't remember that I have had the implementation to use it directly that way right now. I need a bit more input to understand what is the purposes for this - development, production? Of course there is a workaround, so you can just specify it as environment variable in the code (e.g. https://doc.rust-lang.org/std/env/fn.set_var.html). |
Thanks for the info! I am trying to upload some data from the system, and then save it to Firestore, to be later accessed from the web. The binary would be built and distributed. I could just add an instruction to set the environment variable, but it may have chances that it may collide with their own development environment. I could use the |
Thanks for the details. Yes, in your case now I understand more and it is totally makes sense to configure it that way. Right now this library doesn't provide it instead of env bars, so you can leverage it. I'll improve this area in next releases for the cases like yours. |
Thanks! Really appreciate the work you are doing! <3 Shall I keep the issue open till the issue with the documentation is solved, or do you want me to close it? |
Appreciate the kind words. |
@officialpiyush FirestoreDb::with_options_token_source(
FirestoreDbOptions::new(config_env_var("PROJECT_ID")?.to_string()),
gcloud_sdk::GCP_DEFAULT_SCOPES.clone(),
gcloud_sdk::TokenSourceType::File("/tmp/key.json".into())
)
.await?; It is a bit cumbersome for your purposes, but exposes all possible options. |
I'll try it out and let you know! |
I am trying to use
firestore
crate, which is dependent on this crate for authentication. I want to use my service account configuration with it, so I tried to check the documentation of this crate for reference, but it shows that the documentation build wasn't successful.The text was updated successfully, but these errors were encountered: