Skip to content

Instantly share code, notes, and snippets.

@wess
Created November 5, 2020 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wess/7c58ffe2c618520bd9ad0297efecc1f9 to your computer and use it in GitHub Desktop.
Save wess/7c58ffe2c618520bd9ad0297efecc1f9 to your computer and use it in GitHub Desktop.
pub fn auth_request<'a>() -> AuthorizationRequest<'a> {
let config = Config::env();
let scopes:Vec<String> = config.github.scope;
let request =
client()
.authorize_url(CsrfToken::new_random);
for scope in scopes.iter() {
request.add_scope(
Scope::new(scope.clone())
);
}
request
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment