makarski / gauth-rs Goto Github PK
View Code? Open in Web Editor NEWRust Google Oauth2 Client Implementation
License: Apache License 2.0
Rust Google Oauth2 Client Implementation
License: Apache License 2.0
fn cache_token_filekey_err() {}
fn cache_token_dir_err() {}
fn cache_token_token_path_err() {}
fn cache_token_file_create_err() {}
fn cache_token_write_json_err() {}
when using this package with tokio runtime and calling gauth::serv_account::ServiceAccount::from_file
, I have the following error: thread 'main' panicked at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.',
cargo init gauth-bug
cargo add gauth
service-account-key.json
from the package's files and put it in the root of the new rust appfrom_file
like the following:gauth::serv_account::ServiceAccount::from_file(
"service-account-key.json",
vec!["https://www.googleapis.com/auth/firebase.messaging"],
);
cargo add tokio
#[tokio::main]
async fn main() {
gauth::serv_account::ServiceAccount::from_file(
"service-account-key.json",
vec!["https://www.googleapis.com/auth/firebase.messaging"],
);
}
Config file
{
"web": {
"client_id": "",
"project_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_secret": ""
}
}
My use case involves handling many auth credentials which are stored in a database. So reading from a file is not ideal.
I'm willing to contribute this support myself :)
Please update README.
check resource: https://fossa.com/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.