Skip to content

Commit

Permalink
enhance docs - no code changed
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jun 16, 2024
1 parent c62c19c commit 0a975d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<div align="center">

# `elixir-auth-github`
# `elixir-auth-github` 💧 🔒 :octocat:

The _easiest_ way to add GitHub OAuth authentication
to your Elixir/Phoenix Apps.

[![Build Status](https://img.shields.io/travis/com/dwyl/elixir-auth-github/master?color=bright-green&style=flat-square)](https://travis-ci.org/dwyl/elixir-auth-github)
[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/elixir-auth-github/master.svg?style=flat-square)](http://codecov.io/github/dwyl/elixir-auth-github?branch=master)
[![Hex.pm](https://img.shields.io/hexpm/v/elixir_auth_github?color=brightgreen&style=flat-square)](https://hex.pm/packages/elixir_auth_github)
[![docs](https://img.shields.io/badge/docs-maintained-brightgreen?style=flat-square)](https://hexdocs.pm/elixir_auth_github/ElixirAuthGithub.html)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/elixir-auth-github/issues)
[![Libraries.io dependency status](https://img.shields.io/librariesio/release/hex/elixir_auth_github?style=flat-square)](https://libraries.io/hex/elixir_auth_github)
[![HitCount](http://hits.dwyl.com/dwyl/elixir-auth-github.svg)](http://hits.dwyl.com/dwyl/elixir-auth-github)
<!-- Sadly libraries.io is giving 404's on images ...
[![Libraries.io dependency status](https://img.shields.io/librariesio/release/hex/elixir_auth_github?style=flat-square)](https://libraries.io/hex/elixir_auth_github)
-->

</div>

Expand Down
4 changes: 3 additions & 1 deletion lib/elixir_auth_github.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ defmodule ElixirAuthGithub do

@doc """
`client_id/0` returns a `String` of the `GITHUB_CLIENT_ID`
e.g: `"d6fca75c63daa014c187"`
"""
def client_id do
System.get_env("GITHUB_CLIENT_ID") || Application.get_env(:elixir_auth_github, :client_id)
end

@doc """
`client_secret/0` returns a `String` of the `GITHUB_CLIENT_SECRET`
e.g: `"8eeb143935d1a505692aaef856db9b"`
"""
def client_secret do
System.get_env("GITHUB_CLIENT_SECRET") || Application.get_env(:elixir_auth_github, :client_secret)
Expand Down Expand Up @@ -64,7 +66,7 @@ defmodule ElixirAuthGithub do
@doc """
When called with a valid OAuth callback code, `github_auth/1` makes a number of
authentication requests to GitHub and returns a tuple with `:ok` and a map with
GitHub user details and an access_token.
GitHub user details and an `access_token`.
Bad authentication codes will return a tuple with `:error` and an error map.
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/httpoison_mock.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule ElixirAuthGithub.HTTPoisonMock do
@moduledoc """
This is a set up to mock (stub) our API requests to the GitHub API
This is a set up to **mock** (stub) our API requests to the GitHub API
so that we can test all of our code in ElixirAuthGithub.
These are just functions that pattern match on the entries
and return things in the way we expect,
so that we can check the pipeline in ElixirAuthGithub.github_auth
so that we can check the pipeline in `ElixirAuthGithub.github_auth/1`
"""

@doc """
Expand Down

0 comments on commit 0a975d6

Please sign in to comment.