mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-19 04:43:04 +12:00
fix: bug where nil
is not allowed but is returned from secret functions.
This commit is contained in:
parent
59d143583f
commit
ef1b12258b
1 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,10 @@ defmodule AshAuthentication.Strategy.OAuth2.Plug do
|
|||
{:ok, nil} when allow_nil? ->
|
||||
{:ok, config}
|
||||
|
||||
{:ok, nil} ->
|
||||
path = [:authentication, :strategies, strategy.name, secret_name]
|
||||
{:error, Errors.MissingSecret.exception(path: path, resource: strategy.resource)}
|
||||
|
||||
{:ok, value} when is_binary(value) and byte_size(value) > 0 ->
|
||||
{:ok, Map.put(config, secret_name, value)}
|
||||
|
||||
|
|
Loading…
Reference in a new issue