github v0.11.0 Github.Oauth2.Client View Source

Client for GitHub Oauth2

Link to this section Summary

Link to this section Functions

Get access token

Example

iex> Github.Oauth2.Client.access_token!(
  config: [client_id: "client_id", client_secret: "client_secret"],
  params: [code: code]
)
"accessToken"

Generate authorize URL

Example

iex> authorize_url = Github.Oauth2.Client.authorize_url!(
  config: [client_id: "client_id", client_secret: "client_secret"],
  scope: "user:email"
)
"https://github.com/login/oauth/authorize?client_id=client_id&redirect_uri=&response_type=code&scope=user%3Aemail"
Link to this function authorize_url(client, params) View Source
Link to this function get_token(client, params, headers) View Source