github_auth 0.8.0

Authenticate with GitHub from the command line.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate github_auth;

use github_auth::{Authenticator, Scope};

#[async_std::main]
async fn main() -> surf::Result<()> {
    let auth = Authenticator::builder("github_auth main example".into())
        .scope(Scope::PublicRepo)
        .build();

    let token = auth.auth().await?;
    println!("{:?}", token);

    let location = auth.location();
    println!("Token stored at: {:?}", location);
    Ok(())
}