bothy-oauth
Google OAuth helpers for Bothy apps that run their own
sign-in: the CLI, the Python binding and embedded agents. The core crate bothy never does
OAuth; it only asks an AccessTokenProvider for tokens.
loopback_login: browser sign-in with a127.0.0.1redirect and PKCE (RFC 8252).device_login: the device flow for machines without a browser. Google allows only thedrive.filescope there.RefreshingTokens: anAccessTokenProviderthat refreshes and caches access tokens.TokenStore: keeps the grant in the OS keyring, or in a file readable only by the user.
use ;
let client = from_file?;
let grant = device_login
.await?;
let store = file_only;
store.save?;
let tokens = new;
// bothy::remote::drive::DriveRemote::folder(tokens, "robot")
Use OAuth clients of your own Google Cloud project; every client of one project sees the same Drive files.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.