Skip to content

Commit

Permalink
use Base58.encode in apikey_controller.ex #49
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Apr 25, 2020
1 parent 152146c commit 81c790f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/auth_web/controllers/apikey_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ defmodule AuthWeb.ApikeyController do
def create(conn, %{"apikey" => apikey_params}) do
IO.inspect(apikey_params, label: "apikey_params")
person_id = conn.assigns.decoded.id
secret = Fields.AES.encrypt(person_id) |> Base.encode64
secret = Fields.AES.encrypt(person_id) |> Base58.encode
|> IO.inspect(label: "secret")

client = Fields.AES.encrypt(person_id) |> Base.encode64
client = Fields.AES.encrypt(person_id) |> Base58.encode
|> IO.inspect(label: "client")
params = Map.merge(apikey_params, %{
"client_secret" => secret,
Expand Down

0 comments on commit 81c790f

Please sign in to comment.