diff --git a/lib/mix/tasks/guardian.gen.secret.ex b/lib/mix/tasks/guardian.gen.secret.ex index 223bce8d3..9035078f8 100644 --- a/lib/mix/tasks/guardian.gen.secret.ex +++ b/lib/mix/tasks/guardian.gen.secret.ex @@ -27,7 +27,7 @@ defmodule Mix.Tasks.Guardian.Gen.Secret do end defp random_string(length) when length > 31 do - length |> :crypto.strong_rand_bytes() |> Base.encode64() |> binary_part(0, length) + length |> :crypto.strong_rand_bytes() |> Base.url_encode64() |> binary_part(0, length) end defp random_string(_), do: Mix.raise("The secret should be at least 32 characters long")