Skip to content

Commit

Permalink
switch from permanent to temporary redirection 301 > 302 fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Apr 24, 2020
1 parent cf6e2eb commit 4943e7c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:auth_plug, "~> 0.7.0"}
{:auth_plug, "~> 0.8.0"}
]
end
```
Expand All @@ -109,7 +109,7 @@ download the dependency with:
mix deps.get
```

### 2. Get Your API Key
### 2. Get Your API Key 🔑



Expand All @@ -129,7 +129,9 @@ mix deps.get
Documentation can be found at
[https://hexdocs.pm/auth_plug](https://hexdocs.pm/auth_plug).


If _anything_ is unclear,
please open an issue:
https://github.com/dwyl/auth_plug/issues



Expand All @@ -138,3 +140,7 @@ Documentation can be found at
If you are new to Elixir Plug,
we recommend following:
[github.com/dwyl/elixir-plug-tutorial](https://github.com/dwyl/elixir-plug-tutorial).

To understand JSON Web Tokens,
read:
[https://github.com/dwyl/learn-json-web-tokens](https://github.com/dwyl/learn-json-web-tokens).
4 changes: 2 additions & 2 deletions lib/auth_plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ defmodule AuthPlug do
URI.encode(baseurl <> conn.request_path) <>
"&DWYL_API_KEY=" <> @secret

# gotta tell the browser to redirect to the auth_url with 301
status = 301
# gotta tell the browser to temporarily redirect to the auth_url with 302
status = 302

conn
# redirect to auth_url
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule AuthPlug.MixProject do
def project do
[
app: :auth_plug,
version: "0.8.0",
version: "0.9.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit 4943e7c

Please sign in to comment.